-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·29 lines (23 loc) · 949 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
#!/bin/bash
echo " > Downloading dots-cli"
if [ -f dots-cli-linux ]; then
echo " > Existing dots-cli-linux file found. Deleting it."
rm -f dots-cli-linux
fi
wget -nv https://github.com/alvanrahimli/dots-cli/releases/download/v1.0/dots-cli-linux
echo " > Giving executable permission to app"
chmod +x dots-cli-linux
echo " > Moving file to /usr/bin/"
if [ -f /usr/bin/dots ]; then
echo "Executable with name dots found. Delete or move it to resolve conflict"
exit 0
fi
sudo mv dots-cli-linux /usr/bin/dots
echo " > Adding dots as alias to dots-cli-linux"
echo 'alias dots="dots-cli-linux"' >> "$HOME"/.bashrc
echo " > Creating config file"
mkdir "$HOME"/.config/dots-cli/
curl https://raw.githubusercontent.com/alvanrahimli/dots-cli/master/config.json > "$HOME"/.config/dots-cli/config.json
echo " > DONE! Your are ready to go!"
echo " > Restart terminal"
echo " > Run 'dots init myfirstpack' to initialize your first package"