twisterp2pbittorrentblockchainnetworkipv6microbloggingdecentralizedsocial-networkdhttwister-coretwisterarmyp2p-networktwister-servertwister-ipv6
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
680 B
30 lines
680 B
#!/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/src/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 |
|
} |