-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·32 lines (30 loc) · 873 Bytes
/
run.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
set -e
if [ -d "$HOME/dotfiles" ]; then
echo "Repository already exists. Updating..."
cd ~/dotfiles
git pull
else
if type git > /dev/null; then
if ! git clone https://github.com/proteusiq/dotfiles ~/dotfiles; then
echo "Error: Failed to clone the repository using git."
exit 1
fi
else
if ! curl -LO https://github.com/proteusiq/dotfiles/archive/master.zip; then
echo "Error: Failed to download the repository using curl."
exit 1
fi
if ! unzip master.zip; then
echo "Error: Failed to unzip the downloaded file."
exit 1
fi
rm -rf master.zip
mv dotfiles-master ~/dotfiles
fi
chmod +x ~/dotfiles
cd ~/dotfiles
fi
if ! ./install.sh; then
echo "Error: Failed to execute the install script."
exit 1
fi