mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 17:17:01 +08:00
install.sh: -H support multiple keys
This commit is contained in:
parent
c475613744
commit
d493ad9e2d
|
@ -19,8 +19,13 @@ main()
|
||||||
if [[ -z "$key" ]]; then
|
if [[ -z "$key" ]]; then
|
||||||
fmt_fatal "missing key"
|
fmt_fatal "missing key"
|
||||||
fi
|
fi
|
||||||
local url="https://pastebin.com/raw/$key"
|
IFS=',' read -r -a keys<<<"$key"
|
||||||
curl -fsSL "$url" | do_append
|
for k in "${keys[@]}";do
|
||||||
|
if [[ -z "$k" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
curl -fsSL "https://pastebin.com/raw/$k" | do_append
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
main "${GOT_OPTS[@]}"
|
main "${GOT_OPTS[@]}"
|
|
@ -48,8 +48,9 @@ test `git rev-parse HEAD` = `curl -fsSL https://api.beardic.cn/get-var/dfs-commi
|
||||||
git reset --hard $DFS_VERSION
|
git reset --hard $DFS_VERSION
|
||||||
|
|
||||||
# then check install.sh
|
# then check install.sh
|
||||||
./install.sh -dx DFS_CI=1 -H e153a2eL
|
./install.sh -dx DFS_CI=1 -H e153a2eL,f8At3iFw
|
||||||
grep -q "testhist 1" ~/.zsh_history
|
grep -q "testhist 1" ~/.zsh_history
|
||||||
|
grep -q "testhist 4" ~/.zsh_history
|
||||||
grep -q "DFS_CI=1" ~/.config/dotfiles/env
|
grep -q "DFS_CI=1" ~/.config/dotfiles/env
|
||||||
./install.sh -l -x DFS_CI=1
|
./install.sh -l -x DFS_CI=1
|
||||||
dfs version
|
dfs version
|
||||||
|
|
Loading…
Reference in New Issue
Block a user