-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-install.sh
More file actions
executable file
·51 lines (45 loc) · 1.15 KB
/
Copy pathlinux-install.sh
File metadata and controls
executable file
·51 lines (45 loc) · 1.15 KB
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
47
48
49
50
51
#!/bin/bash
echo ""
if ! [ -f "./CreateMakeFile.sh" ]; then
echo "CreateMakeFile.sh is missing! Aborting..."
echo ""
exit
fi
chmod +x ./CreateMakeFile.sh
echo "CreateMakeFile.sh has been made executable..."
echo ""
echo "Copying CreateMakeFile.sh to /usr/bin/CreateMakeFile..."
sudo cp ./CreateMakeFile.sh /usr/local/bin/CreateMakeFile
echo ""
if [ -f "/usr/local/bin/CreateMakeFile" ]; then
echo "Installation succesfully complete."
echo ""
else
echo "Installation error: Copying failed"
echo "Aborting ..."
echo ""
exit
fi
while [[ true ]]; do
read -p "Do you wish to make a configuration file? [y/N]" choice
case "$choice" in
[Nn] | [Nn][Oo] | "")
if [ -f ~/.config/CreateMakeFiles/CreateMakeFiles.conf ]; then
echo "Config wasn't created, but older one was found."
fi
exit
;;
[Yy] | [Yy][Ee][Ss])
mkdir ~/.config/
mkdir ~/.config/CreateMakeFile/
cp ./CreateMakeFile.conf ~/.config/CreateMakeFiles/CreateMakeFiles.conf
if [ -f ~/.config/CreateMakeFiles/CreateMakeFiles.conf ]; then
echo "Config has been succesfully created."
fi
exit
;;
*)
echo "Invalid input..."
;;
esac
done