From b5e9fed54e0df50e21876446092b15bb7d21569b Mon Sep 17 00:00:00 2001 From: Konano Date: Sat, 22 Jul 2023 15:03:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20-f=20=E4=BD=BF=E7=94=A8=E5=8F=8C?= =?UTF-8?q?=E5=BC=95=E5=8F=B7=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=20~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init_root.sh | 12 ++++++------ init_sudo.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) 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