-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·32 lines (25 loc) · 885 Bytes
/
setup.sh
File metadata and controls
executable file
·32 lines (25 loc) · 885 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
echo "WCA Competitions Search Setup"
echo "Enter a region that you would like to limit searches to: "
read region
echo "{ \"region\" : \"${region}\" }" > config.json
echo "Confirm installing to ~/.local/share/wca? [y/n]"
read confirmation
if [ $confirmation = "y" ]; then
mkdir ~/.local/share/wca
cp competitions.txt ~/.local/share/wca/competitions.txt
cp config.json ~/.local/share/wca/config.json
cp uninstall.sh ~/.local/share/wca/uninstall.sh
sudo cp wca /usr/local/bin/wca
echo "" > competitions.txt
echo "setup complete"
else
echo "Cancelled installation"
fi
echo "WCA competitions search has been installed to ~/.local/share/wca"
echo "Would you like to delete this folder as well? [y/n]"
read delete_original_dir
if [ $delete_original_dir = "y" ]; then
cd ..
rm -rf ./wca-comp-check
echo "wca-comp-check directory deleted"
fi