diff --git a/init_root.sh b/init_root.sh index 59fe527..8450829 100755 --- a/init_root.sh +++ b/init_root.sh @@ -36,7 +36,7 @@ check_google_access() { } configure_ssh() { - [ -f "~/.ssh/authorized_keys" ] && return + [ -f ~/.ssh/authorized_keys ] && return read -p "要配置 .ssh 吗?[Y/n]: " response @@ -47,7 +47,7 @@ configure_ssh() { } configure_ssh_keygen() { - [ -f "~/.ssh/id_ed25519.pub" ] && return + [ -f ~/.ssh/id_ed25519.pub ] && return read -p "要生成 sshkey 吗?[y/N]: " response @@ -59,7 +59,7 @@ configure_ssh_keygen() { } configure_nano() { - [ -f "~/.nanorc" ] && return + [ -f ~/.nanorc ] && return read -p "要配置 nano 吗?[Y/n]: " response @@ -108,7 +108,7 @@ configure_apt_install() { } configure_zsh() { - [ -f "~/.zshrc" ] && return + [ -f ~/.zshrc ] && return read -p "要配置 zsh 吗?[Y/n]: " response @@ -128,7 +128,7 @@ configure_zsh() { } configure_tmux() { - [ -f "~/.tmux.conf" ] && return + [ -f ~/.tmux.conf ] && return read -p "要配置 tmux 吗?[Y/n]: " response @@ -145,7 +145,7 @@ configure_tmux() { } 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 diff --git a/init_sudo.sh b/init_sudo.sh index 5f0019e..8939af4 100755 --- a/init_sudo.sh +++ b/init_sudo.sh @@ -36,7 +36,7 @@ check_google_access() { } configure_ssh() { - [ -f "~/.ssh/authorized_keys" ] && return + [ -f ~/.ssh/authorized_keys ] && return read -p "要配置 .ssh 吗?[Y/n]: " response @@ -47,7 +47,7 @@ configure_ssh() { } configure_ssh_keygen() { - [ -f "~/.ssh/id_ed25519.pub" ] && return + [ -f ~/.ssh/id_ed25519.pub ] && return read -p "要生成 sshkey 吗?[y/N]: " response @@ -59,7 +59,7 @@ configure_ssh_keygen() { } configure_nano() { - [ -f "~/.nanorc" ] && return + [ -f ~/.nanorc ] && return read -p "要配置 nano 吗?[Y/n]: " response @@ -108,7 +108,7 @@ configure_apt_install() { } configure_zsh() { - [ -f "~/.zshrc" ] && return + [ -f ~/.zshrc ] && return read -p "要配置 zsh 吗?[Y/n]: " response @@ -128,7 +128,7 @@ configure_zsh() { } configure_tmux() { - [ -f "~/.tmux.conf" ] && return + [ -f ~/.tmux.conf ] && return read -p "要配置 tmux 吗?[Y/n]: " response @@ -145,7 +145,7 @@ configure_tmux() { } 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