-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-dotfiles.sh
More file actions
executable file
·36 lines (31 loc) · 976 Bytes
/
update-dotfiles.sh
File metadata and controls
executable file
·36 lines (31 loc) · 976 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
#!/usr/bin/env bash
# script=$(curl -fsS "https://raw.githubusercontent.com/softvisio/scripts/main/update-dotfiles.sh")
#
# update installed profiles
# source <(echo "$script")
#
# install / update "public" profile
# source <(echo "$script") public
#
# install / update "private" profile
# source <(echo "$script") private
#
# install / update "deployment" profile
# source <(echo "$script") deployment
set -Eeuo pipefail
trap 'echo -e "⚠ Error ($0:$LINENO): $(sed -n "${LINENO}p" "$0" 2> /dev/null | grep -oE "\S.*\S|\S" || true)" >&2; return 3 2> /dev/null || exit 3' ERR
function update-dotfiles() {
local dotfiles=$(
cat << JSON
{
"public": "zdm/dotfiles-public",
"private": "zdm/dotfiles-private",
"deployment": "zdm/dotfiles-deployment"
}
JSON
)
local script
script=$(curl -fsS "https://raw.githubusercontent.com/softvisio/scripts/main/dotfiles.sh")
source <(echo "$script") "$dotfiles" "$@"
}
update-dotfiles "$@"