forked from MrPickles/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdotfiles.sh
More file actions
executable file
·32 lines (25 loc) · 780 Bytes
/
Copy pathdotfiles.sh
File metadata and controls
executable file
·32 lines (25 loc) · 780 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
27
28
29
30
31
32
#!/usr/bin/env bash
# This is the one-liner installation script for these dotfiles. To install,
# run one of these two commands...
#
# curl -L andrew.cloud/dotfiles.sh | sh
# or
# wget -qO- andrew.cloud/dotfiles.sh | sh
{ # This ensures the entire script is downloaded.
basedir=$HOME/.dotfiles
repourl=https://github.com/GoingTharn/dotfiles.git
if ! command -v git >/dev/null ; then
echo "Error: Git is not installed!"
exit 1
fi
if [ -d "$basedir/.git" ]; then
cd "$basedir" || exit
git pull --quiet --rebase origin master
else
rm -rf "$basedir"
git clone --quiet --filter=blob:none "$repourl" "$basedir"
fi
cd "$basedir" || exit
# shellcheck source=setup.sh
. setup.sh -t build
} # This ensures the entire script is downloaded.