-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·37 lines (31 loc) · 893 Bytes
/
bootstrap
File metadata and controls
executable file
·37 lines (31 loc) · 893 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
#!/usr/bin/env bash
set -euo pipefail
if [ -d ~/dotfiles ]; then
echo "Dotfiles already installed. Exiting"
exit 1
fi
TEMP="$(mktemp -d)"
trap 'rm -rf -- "$TEMP"' EXIT
cd "$TEMP"
# Download stowaway
case "$(uname -sm)" in
"Darwin x86_64")
release=darwin-amd64
;;
"Darwin arm64")
release=darwin-arm64
;;
"Linux x86_64")
release=linux-amd64
;;
*)
exit 1
;;
esac
curl -sLO "https://github.com/jamesbehr/stowaway/releases/latest/download/stowaway-${release}.tar.gz"
curl -sLO "https://github.com/jamesbehr/stowaway/releases/latest/download/stowaway-${release}.tar.gz.sha256sum"
sha256sum --quiet -c "stowaway-${release}.tar.gz.sha256sum"
tar -xzf "stowaway-${release}.tar.gz"
git clone git@github.com:jamesbehr/dotfiles.git ~/dotfiles
cd ~/dotfiles
$TEMP/stowaway stow --target "$HOME" --interactive */