-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·36 lines (28 loc) · 875 Bytes
/
install.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
#!/bin/bash
cat << INSTALL
This installer will install Codebase on your system.
The following changes will be made:
1) New directory ~/.CODEBASE will be created.
2) ~/.CODEBASE will be added to the PATH Variable.
Make sure that you have the Bash Shell installed.
INSTALL
read -p "Proceed with the installation? [Y/n] " confirm
if [ -z $confirm ] || [ "$confirm" == "y" ] || [ "$confirm" == "Y" ]; then
if [ -d ~/.CODEBASE ]; then
rm -rf ~/.CODEBASE
echo "Previously installed Codebase is now removed."
mkdir ~/.CODEBASE
else
mkdir ~/.CODEBASE
fi
cp cbase.sh ~/.CODEBASE/cbase
chmod 755 ~/.CODEBASE/cbase
echo "Codebase installed."
echo 'export PATH="~/.CODEBASE:$PATH"' >> ~/.bashrc
echo "Added to PATH Variable."
source ~/.bashrc
echo -e "\nDone!\nInstalled at ~/.CODEBASE\n"
else
echo "Installation process aborted!"
exit
fi