-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
39 lines (31 loc) · 910 Bytes
/
Copy pathinit.sh
File metadata and controls
39 lines (31 loc) · 910 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
33
34
35
36
37
38
39
#!/usr/bin/env bash
# Initialise system to launch bootstrap.sh
BRANCH="main"
# retrieve utils.sh file
_tmp_utils="/tmp/utils.sh"
_utils_link="https://raw.githubusercontent.com/pbignardi/dotfiles/refs/heads/$BRANCH/utils.sh"
echo "==> Downloading utils.sh file"
if command -v curl &> /dev/null; then
curl -L "$_utils_link" -o "$_tmp_utils"
elif command -v wget &> /dev/null; then
wget "$_utils_link" -O "$_tmp_utils"
else
echo "[!!] Missing dependencies: install either CURL or WGET"
exit 1
fi
# source utils
source $_tmp_utils
echo "==> Installing git"
if isArchlinux; then
sudo pacman -S git --noconfirm
elif isFedora; then
sudo dnf install -y git
elif isDebian; then
sudo apt-get install -y git
fi
# clone dotfiles
echo "==> Cloning dotfiles to ~/dotfiles"
git clone -b "$BRANCH" https://github.com/pbignardi/dotfiles.git
# call bootstrap.sh
cd dotfiles
bash bootstrap.sh