mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-12 14:02:33 +00:00
27 lines
575 B
Bash
27 lines
575 B
Bash
#!/bin/bash -ex
|
|
|
|
gem install --user-install seccomp-tools
|
|
|
|
GEM_BIN_PATH=$(gem environment | grep "USER INSTALL" | awk -F ': ' '{ print $2 }')/bin
|
|
|
|
MAGIC="# ctf-tools: gem install"
|
|
for f in ~/.bashrc ~/.zshrc; do
|
|
if [[ -e "$f" ]]; then
|
|
if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then
|
|
cat >> "$f" << EOF
|
|
$MAGIC
|
|
export PATH=\$PATH:$GEM_BIN_PATH
|
|
EOF
|
|
fi
|
|
fi
|
|
done
|
|
|
|
f=~/.config/fish/config.fish
|
|
if [[ -e "$f" ]]; then
|
|
if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then
|
|
cat >> "$f" << EOF
|
|
$MAGIC
|
|
set -x PATH \$PATH $GEM_BIN_PATH
|
|
EOF
|
|
fi
|
|
fi
|