minor change

This commit is contained in:
Dict Xiong 2022-11-03 22:57:33 +08:00
parent d3766b883e
commit 1ce4aab8a7
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
declare -A install_commands declare -A INSTALL_COMMANDS
install_commands=(\ INSTALL_COMMANDS=(\
[git]="apt update && apt install git" \ [git]="apt update && apt install git" \
[fzf]="git clone --depth 1 https://gitee.com/dictxiong/fzf.git ~/.fzf && ~/.fzf/install" \ [fzf]="git clone --depth 1 https://gitee.com/dictxiong/fzf.git ~/.fzf && ~/.fzf/install" \
[acme.sh]="curl https://get.acme.sh | sh -s email=${EMAIL:-me@beardic.cn}" \ [acme.sh]="curl https://get.acme.sh | sh -s email=${EMAIL:-me@beardic.cn}" \
@ -15,7 +15,7 @@ install_commands=(\
install() install()
{ {
echo -e ${install_commands[$1]} echo -e ${INSTALL_COMMANDS[$1]}
} }
install $1 install $1

View File

@ -19,7 +19,7 @@ pacman_S()
router() router()
{ {
case $1 in case $1 in
pacman-S ) pacman_S ;; pacman-S ) pacman_S ;;
set-mirror ) set_mirror $2 ;; set-mirror ) set_mirror $2 ;;
* ) echo unknown command "$1". available: pacman-S, set-mirror ;; * ) echo unknown command "$1". available: pacman-S, set-mirror ;;
esac esac

View File

@ -1,4 +1,4 @@
#!/bin/false "This script should be sourced in a shell, not executed directly" #!/bin/false "This script should be sourced in zsh, not executed directly"
set -ex set -ex