mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 06:48:07 +00:00
73e8df12cf
Also using the new autoconf
30 lines
676 B
Bash
30 lines
676 B
Bash
#!/bin/bash
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
export TWISTER_CORE_PATH='/home/vagrant/twister-core'
|
|
export TWISTER_HOME='/home/vagrant/.twister'
|
|
|
|
alias twisterd='$TWISTER_CORE_PATH/twisterd'
|
|
|
|
|
|
|
|
if [ ! -n "$TWISTER_OLD_PATH" ]; then
|
|
echo 'setting up the environment'
|
|
export TWISTER_OLD_PATH=$PATH
|
|
export TWISTER_OLD_PS1=$PS1
|
|
export PATH=$DIR/bin:$PATH
|
|
export PS1="(twister)$PS1\n> "
|
|
else
|
|
echo 'already active'
|
|
fi
|
|
|
|
function deactivate {
|
|
if [ -n "$TWISTER_OLD_PATH" ]; then
|
|
echo 'cleaning up the environment'
|
|
export PATH=$TWISTER_OLD_PATH
|
|
export PS1=$TWISTER_OLD_PS1
|
|
unset TWISTER_OLD_PATH
|
|
unset TWISTER_OLD_PS1
|
|
unset -f deactivate
|
|
fi
|
|
} |