-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
46 lines (22 loc) · 815 Bytes
/
setup.sh
File metadata and controls
46 lines (22 loc) · 815 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -e
TARGET=''; if [ -d "Appearance" ]; then TARGET="Appearance/"; fi
DIRECTORY="My-Notes"
# Clone repository.
REPOSITORY="https://github.com/EngineMachiner/My-Notes.git"
git clone "$REPOSITORY" "$DIRECTORY"
while true; do
while true; do
# Branch checkout.
echo "Please enter the branch name.";
read BRANCH; git -C "$DIRECTORY" checkout "$BRANCH" || continue
echo "Moving noteskins and judgements..."
cp -r "$DIRECTORY/NoteSkins/." "$TARGET/NoteSkins/$BRANCH"
cp -r "$DIRECTORY/Judgments" "$TARGET"
break
done
echo "Clone another branch?"
select OPTION in "Yes" "No"; do break; done
if [ $OPTION == "No" ]; then break; fi
done
rm -rf "$DIRECTORY"; echo "Exiting..."