forked from petabridge/akka-bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish_to_dropbox.sh
More file actions
27 lines (22 loc) · 834 Bytes
/
Copy pathpublish_to_dropbox.sh
File metadata and controls
27 lines (22 loc) · 834 Bytes
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
#!/bin/bash
# echo Running $BASH_SOURCE
# set | egrep GIT
# echo PWD is $PWD
if [ -z "$1" ]; then
echo "Need to specify a root directory for saving files."
echo "Exiting..."
exit
fi
echo "Saving output to $1"
# ensure on master before publishing
if [ `git rev-parse --abbrev-ref HEAD` == "master" ]; then
# publish Unit 1 DoThis and Completed
git archive -o "$1/Unit1-DoThis.zip" HEAD:src/Unit-1/DoThis/
git archive -o "$1/Unit1-Completed.zip" HEAD:src/Unit-1/lesson6/
# publish Unit 2 DoThis and Completed
git archive -o "$1/Unit2-DoThis.zip" HEAD:src/Unit-2/DoThis/
git archive -o "$1/Unit2-Completed.zip" HEAD:src/Unit-2/lesson5/
# publish Unit 3 DoThis and Completed
git archive -o "$1/Unit3-DoThis.zip" HEAD:src/Unit-3/DoThis/
git archive -o "$1/Unit3-Completed.zip" HEAD:src/Unit-3/lesson5/
fi