script changes

This commit is contained in:
Tyrel Souza 2017-02-06 11:23:43 -05:00
parent 645ec935cd
commit c5e14d1978
No known key found for this signature in database
GPG Key ID: 2EECB5087209E6A5
2 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,9 @@
function adg
vf activate addgene-core
if test -d ~/code/github/addgene/addgene-core
cd ~/code/github/addgene/addgene-core
end
if test -d ~/AddgeneProjects/addgene-core
cd ~/AddgeneProjects/addgene-core
end
end

11
zshrc
View File

@ -73,3 +73,14 @@ if [ -e $HOME/.credentials ];then
source $HOME/.credentials
fi
export PYTHONSTARTUP=$HOME/.pythonstartup.py
function adtest () {
no_slashes="$(echo "$1" | sed -e 's/\//\./g')";
a_test="$(echo "$no_slashes" | sed -e 's/.py//g')";
a_project=$(echo -n "$a_test" | python -c "import sys; print sys.stdin.read().split('.', 1)[0]");
run_test=$(echo "bin/manage_$a_project.py test $a_test");
echo "Evaling $run_test";
eval $run_test;
}