-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstaller.sh
More file actions
26 lines (21 loc) · 746 Bytes
/
installer.sh
File metadata and controls
26 lines (21 loc) · 746 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
#!/bin/bash
function createfolder()
{
if [ ! -d $1 ]; then
mkdir -p $1
fi
}
CYANE="$(tput setaf 26)"
RESET="$(tput sgr0)"
createfolder "$HOME/compiler"
link="/usr/local/bin/compile"
rm $link 2> /dev/null
(curl -s https://raw.githubusercontent.com/balamou/compiler/master/compile.sh) > "$HOME/compiler/compile.sh"
echo "$HOME/compiler/compile.sh successfully loaded"
(curl -s https://raw.githubusercontent.com/balamou/compiler/master/config) > "$HOME/compiler/config"
echo "$HOME/compiler/config successfully loaded"
echo "Creating symlink..."
sudo ln -s "$HOME/compiler/compile.sh" "$link"
cd "$HOME/compiler/"
chmod +x compile.sh # make the bash script into an executable
echo "${CYANE}Compile command successfully installed!${RESET}"