summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSuper User <root@p.noml.ch>2026-03-23 19:18:34 +0800
committerSuper User <root@p.noml.ch>2026-03-23 19:18:34 +0800
commit6086e908152e97011681e6d91cd7fe627c5cf02f (patch)
treec0a4b86266dda798f02ab3b04cffd52e7b7da9dc /core
parent1dab0d9e770466c64b6a822d30307848b710c40c (diff)
fix ssh sed-replace, remove set paste, add claude idempotency guard
Diffstat (limited to 'core')
-rwxr-xr-xcore/packages/install_claude.sh3
-rwxr-xr-xcore/ssh.sh14
-rwxr-xr-xcore/vim.sh1
3 files changed, 12 insertions, 6 deletions
diff --git a/core/packages/install_claude.sh b/core/packages/install_claude.sh
index 99a881d..6a730d6 100755
--- a/core/packages/install_claude.sh
+++ b/core/packages/install_claude.sh
@@ -1,4 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2
3command -v claude &>/dev/null && exit 0
4
2sudo dnf install -y tar 5sudo dnf install -y tar
3# Install Node.js via nvm and Claude Code 6# Install Node.js via nvm and Claude Code
4curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash 7curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
diff --git a/core/ssh.sh b/core/ssh.sh
index f23d571..63d5ea9 100755
--- a/core/ssh.sh
+++ b/core/ssh.sh
@@ -1,11 +1,15 @@
1#!/bin/bash 1#!/bin/bash
2 2
3dnf install -y git 3sudo dnf install -y git
4 4
5grep -q 'PasswordAuthentication no' /etc/ssh/sshd_config || echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config 5sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
6grep -q 'AllowTcpForwarding yes' /etc/ssh/sshd_config || echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config 6grep -q '^PasswordAuthentication' /etc/ssh/sshd_config || echo "PasswordAuthentication no" | sudo tee -a /etc/ssh/sshd_config
7grep -q 'GatewayPorts yes' /etc/ssh/sshd_config || echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config 7sudo sed -i 's/^#\?AllowTcpForwarding.*/AllowTcpForwarding yes/' /etc/ssh/sshd_config
8grep -q 'AllowAgentForwarding yes' /etc/ssh/sshd_config || echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config 8grep -q '^AllowTcpForwarding' /etc/ssh/sshd_config || echo "AllowTcpForwarding yes" | sudo tee -a /etc/ssh/sshd_config
9sudo sed -i 's/^#\?GatewayPorts.*/GatewayPorts yes/' /etc/ssh/sshd_config
10grep -q '^GatewayPorts' /etc/ssh/sshd_config || echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config
11sudo sed -i 's/^#\?AllowAgentForwarding.*/AllowAgentForwarding yes/' /etc/ssh/sshd_config
12grep -q '^AllowAgentForwarding' /etc/ssh/sshd_config || echo "AllowAgentForwarding yes" | sudo tee -a /etc/ssh/sshd_config
9 13
10SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 14SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11"$SCRIPT_DIR/../keys/add-ssh-keys.sh" 15"$SCRIPT_DIR/../keys/add-ssh-keys.sh"
diff --git a/core/vim.sh b/core/vim.sh
index bd99a13..2b2854e 100755
--- a/core/vim.sh
+++ b/core/vim.sh
@@ -57,7 +57,6 @@ nnoremap <C-e> $
57 57
58set number 58set number
59setlocal regexpengine=2 59setlocal regexpengine=2
60set paste
61set foldcolumn=12 60set foldcolumn=12
62 61
63set noswapfile 62set noswapfile