2016-11-18 09:41:13 +00:00
|
|
|
alias ctpr="ctf project run --" # shortcut helper for ctp
|
2016-09-12 15:52:11 +01:00
|
|
|
|
|
|
|
ctp() {
|
|
|
|
if [[ $1 == "shell" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr manage.py shell
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "build" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr build
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [ $1 == "test" ] || [ $1 == "t" ]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr runtests ${@:2}
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "run" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr ${@:2}
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "manage" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr manage.py ${@:2}
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "migrate" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr manage.py migrate ${@:2}
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "makemigrations" ]]; then
|
2016-11-07 20:57:18 +00:00
|
|
|
ctpr manage.py makemigrations ${@:2}
|
2016-09-12 15:52:11 +01:00
|
|
|
elif [[ $1 == "route" ]]; then
|
|
|
|
command ctf router ${PWD##*/}.ctf.sh --ident ${PWD##*/}:development:web
|
|
|
|
else
|
|
|
|
command ctf project $@
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
alias ctfs="cd ~/catfish && ./start && cd - > /dev/null"
|
2017-01-09 09:19:24 +00:00
|
|
|
|
|
|
|
export CATFISH_HOSTNAME_OVERRIDE=localhost
|