-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sh
28 lines (24 loc) · 875 Bytes
/
update.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
if ! [ -d "qual-o-mat-data" ]; then
git clone https://github.com/gockelhahn/qual-o-mat-data.git || { echo An error has occured while downloading the Repository.; exit 1; }
fi
cd qual-o-mat-data
git checkout -b temp
git pull https://github.com/gockelhahn/qual-o-mat-data.git || { echo An error has occured while updating the Repository.; git checkout master; git branch --delete temp; exit 1; }
cd ..
mkdir -p -m 777 scaled-data
while :
do
echo "Enter scaling type (nominal / ordinal). Enter \"exit\" to abort:"
read scaletype
if [[ $scaletype == "nominal" ]] || [[ $scaletype == "ordinal" ]]; then
{ java -jar builds/uberjar/electionscaling-0.1.0-standalone.jar $scaletype; break; }
elif [[ $scaletype == "exit" ]]; then
break
else
echo Invalid scale type.
fi
done
cd qual-o-mat-data
git checkout master
git merge temp
git branch --delete temp