mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 12:56:59 +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
|
||||
fmt_fatal "missing key"
|
||||
fi
|
||||
local url="https://pastebin.com/raw/$key"
|
||||
curl -fsSL "$url" | do_append
|
||||
IFS=',' read -r -a keys<<<"$key"
|
||||
for k in "${keys[@]}";do
|
||||
if [[ -z "$k" ]]; then
|
||||
continue
|
||||
fi
|
||||
curl -fsSL "https://pastebin.com/raw/$k" | do_append
|
||||
done
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
# 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 4" ~/.zsh_history
|
||||
grep -q "DFS_CI=1" ~/.config/dotfiles/env
|
||||
./install.sh -l -x DFS_CI=1
|
||||
dfs version
|
||||
|
|
Loading…
Reference in New Issue
Block a user