-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_euler.sh
executable file
·31 lines (26 loc) · 1.1 KB
/
push_euler.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
if [ $(hostname) = "xps" ]; then
LOCAL_PROJ_DIR=~/approximate_optimal_control/
else
# ~ is /nas/dbalduin :(
LOCAL_PROJ_DIR=/local/home/dbalduin/approximate_optimal_control/
fi
# echo syncing from $LOCAL_PROJ_DIR to euler...
#
# rsync -av --dry-run --exclude-from=.gitignore --exclude='.git*' $LOCAL_PROJ_DIR/ dbalduin@euler.ethz.ch:/cluster/home/dbalduin/approximate_optimal_control
#
# echo
# echo "^^^ this was the dry run ^^^"
# echo -n "push these files for real? [y/n] "
#
# read answer
#
# if [ $answer = y ]; then
# rsync -av --exclude-from=.gitignore --exclude='.git*' $LOCAL_PROJ_DIR/ dbalduin@euler.ethz.ch:/cluster/home/dbalduin/approximate_optimal_control
# else
# echo not doing anything. goodbye
# fi
# kind of dumb to do a dry run and ask every time. trust the user :)
# exclude also the git directory (not in gitignore...) and the euler pull/push
# scripts which don't make sense running on euler
rsync -avp --exclude-from=.gitignore --exclude='.git*' --exclude='*euler.sh' $LOCAL_PROJ_DIR/ dbalduin@euler.ethz.ch:/cluster/home/dbalduin/approximate_optimal_control