mirror of
https://github.com/zardus/ctf-tools
synced 2025-03-02 22:27:18 +00:00
moved shell path setup into base_build_setup funciton, create py2 virtualenv during install
This commit is contained in:
parent
910d8c0049
commit
abf6c16250
1 changed files with 17 additions and 12 deletions
|
@ -114,10 +114,27 @@ function base_build_setup()
|
|||
;;
|
||||
"archlinux")
|
||||
base_build_setup_arch
|
||||
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
|
||||
;;
|
||||
*)
|
||||
TOOL=SETUP tool_log "Cannot detect or unsupported distribution"
|
||||
esac
|
||||
|
||||
## setup PATH for several shells
|
||||
|
||||
echo "export PATH=\"$PWD/bin:\$PATH\"" >> ~/.bashrc
|
||||
|
||||
if [ -e ~/.zshrc ]
|
||||
then
|
||||
echo "export PATH=\"$PWD/bin:\$PATH\"" >> ~/.zshrc
|
||||
fi
|
||||
|
||||
if [ -e ~/.config/fish/config.fish ]; then
|
||||
echo "set -x PATH $PWD/bin \$PATH " >> ~/.config/fish/config.fish
|
||||
fi
|
||||
|
||||
# create the py2 virtualenv
|
||||
"$PWD/bin/ctf-tools-pip" freeze 2>&1 >/dev/null || true
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,18 +188,6 @@ case $ACTION in
|
|||
setup)
|
||||
|
||||
base_build_setup "$DISTRI"
|
||||
|
||||
echo "PATH=\"$PWD/bin:\$PATH\"" >> ~/.bashrc
|
||||
|
||||
if [ -e ~/.zshrc ]
|
||||
then
|
||||
echo "PATH=\"$PWD/bin:\$PATH\"" >> ~/.zshrc
|
||||
fi
|
||||
|
||||
if [ -e ~/.config/fish/config.fish ]; then
|
||||
echo "set -x PATH $PATH $PWD/bin" >> ~/.config/fish/config.fish
|
||||
fi
|
||||
|
||||
;;
|
||||
list)
|
||||
for t in *
|
||||
|
|
Loading…
Add table
Reference in a new issue