fix: -f 使用双引号无法正确解析 ~
This commit is contained in:
parent
4945bdd752
commit
b5e9fed54e
12
init_root.sh
12
init_root.sh
@ -36,7 +36,7 @@ check_google_access() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_ssh() {
|
configure_ssh() {
|
||||||
[ -f "~/.ssh/authorized_keys" ] && return
|
[ -f ~/.ssh/authorized_keys ] && return
|
||||||
|
|
||||||
read -p "要配置 .ssh 吗?[Y/n]: " response
|
read -p "要配置 .ssh 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ configure_ssh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_ssh_keygen() {
|
configure_ssh_keygen() {
|
||||||
[ -f "~/.ssh/id_ed25519.pub" ] && return
|
[ -f ~/.ssh/id_ed25519.pub ] && return
|
||||||
|
|
||||||
read -p "要生成 sshkey 吗?[y/N]: " response
|
read -p "要生成 sshkey 吗?[y/N]: " response
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ configure_ssh_keygen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_nano() {
|
configure_nano() {
|
||||||
[ -f "~/.nanorc" ] && return
|
[ -f ~/.nanorc ] && return
|
||||||
|
|
||||||
read -p "要配置 nano 吗?[Y/n]: " response
|
read -p "要配置 nano 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ configure_apt_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_zsh() {
|
configure_zsh() {
|
||||||
[ -f "~/.zshrc" ] && return
|
[ -f ~/.zshrc ] && return
|
||||||
|
|
||||||
read -p "要配置 zsh 吗?[Y/n]: " response
|
read -p "要配置 zsh 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ configure_zsh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_tmux() {
|
configure_tmux() {
|
||||||
[ -f "~/.tmux.conf" ] && return
|
[ -f ~/.tmux.conf ] && return
|
||||||
|
|
||||||
read -p "要配置 tmux 吗?[Y/n]: " response
|
read -p "要配置 tmux 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ configure_tmux() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_iptables() {
|
configure_iptables() {
|
||||||
[ -f "/etc/network/if-pre-up.d/iptables-load" ] && return
|
[ -f /etc/network/if-pre-up.d/iptables-load ] && return
|
||||||
|
|
||||||
read -p "要配置 iptables 吗?[n/Y]: " response
|
read -p "要配置 iptables 吗?[n/Y]: " response
|
||||||
|
|
||||||
|
|||||||
12
init_sudo.sh
12
init_sudo.sh
@ -36,7 +36,7 @@ check_google_access() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_ssh() {
|
configure_ssh() {
|
||||||
[ -f "~/.ssh/authorized_keys" ] && return
|
[ -f ~/.ssh/authorized_keys ] && return
|
||||||
|
|
||||||
read -p "要配置 .ssh 吗?[Y/n]: " response
|
read -p "要配置 .ssh 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ configure_ssh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_ssh_keygen() {
|
configure_ssh_keygen() {
|
||||||
[ -f "~/.ssh/id_ed25519.pub" ] && return
|
[ -f ~/.ssh/id_ed25519.pub ] && return
|
||||||
|
|
||||||
read -p "要生成 sshkey 吗?[y/N]: " response
|
read -p "要生成 sshkey 吗?[y/N]: " response
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ configure_ssh_keygen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_nano() {
|
configure_nano() {
|
||||||
[ -f "~/.nanorc" ] && return
|
[ -f ~/.nanorc ] && return
|
||||||
|
|
||||||
read -p "要配置 nano 吗?[Y/n]: " response
|
read -p "要配置 nano 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ configure_apt_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_zsh() {
|
configure_zsh() {
|
||||||
[ -f "~/.zshrc" ] && return
|
[ -f ~/.zshrc ] && return
|
||||||
|
|
||||||
read -p "要配置 zsh 吗?[Y/n]: " response
|
read -p "要配置 zsh 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ configure_zsh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_tmux() {
|
configure_tmux() {
|
||||||
[ -f "~/.tmux.conf" ] && return
|
[ -f ~/.tmux.conf ] && return
|
||||||
|
|
||||||
read -p "要配置 tmux 吗?[Y/n]: " response
|
read -p "要配置 tmux 吗?[Y/n]: " response
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ configure_tmux() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_iptables() {
|
configure_iptables() {
|
||||||
[ -f "/etc/network/if-pre-up.d/iptables-load" ] && return
|
[ -f /etc/network/if-pre-up.d/iptables-load ] && return
|
||||||
|
|
||||||
read -p "要配置 iptables 吗?[n/Y]: " response
|
read -p "要配置 iptables 吗?[n/Y]: " response
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user