-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathremote_install.sh
More file actions
executable file
·27 lines (22 loc) · 782 Bytes
/
remote_install.sh
File metadata and controls
executable file
·27 lines (22 loc) · 782 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
#!/bin/sh
# Install remotely from single shell command
# Usage : sh -c "$(curl -fsSL https://raw.githubusercontent.com/narze/dotfiles/chezmoi/remote_install.sh)"
echo "Installing Xcode Command Line Tools"
xcode-select --install
set -e # -e: exit on error
if [ ! "$(command -v chezmoi)" ]; then
bin_dir="$HOME/.local/bin"
chezmoi="$bin_dir/chezmoi"
if [ "$(command -v curl)" ]; then
sh -c "$(curl -fsSL https://git.io/chezmoi)" -- -b "$bin_dir"
elif [ "$(command -v wget)" ]; then
sh -c "$(wget -qO- https://git.io/chezmoi)" -- -b "$bin_dir"
else
echo "To install chezmoi, you must have curl or wget installed." >&2
exit 1
fi
else
chezmoi=chezmoi
fi
# exec: replace current process with chezmoi init
exec "$chezmoi" init --apply narze --keep-going