-
Notifications
You must be signed in to change notification settings - Fork 134
/
revert.sh
executable file
·37 lines (26 loc) · 825 Bytes
/
revert.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
32
33
34
35
36
37
#!/bin/bash
#Reminder , to get a single file out of the repo use "git checkout -- path/to/file.c"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
#All OpenGL/BVH code relies on RGBDAcquisition code so we need to sync this as well
if [ -f dependencies/RGBDAcquisition/README.md ]; then
echo "RGBDAcquisition appears to exist, reverting it .."
cd dependencies/RGBDAcquisition
git reset --hard HEAD
git pull origin master
cd "$DIR"
else
echo "Could not find RGBDAcquisition, please rerun the initialize.sh script .."
fi
if [ -f dependencies/AmmarServer/README.md ]; then
echo "AmmarServer appears to exist, reverting it .."
cd dependencies/AmmarServer
git reset --hard HEAD
git pull origin master
cd "$DIR"
fi
#Now sync rest of code
cd "$DIR"
git reset --hard HEAD
git pull origin master
exit 0