diff --git a/run_once_before_install_main_deps.sh.tmpl b/run_once_before_install_main_deps.sh.tmpl index c90f47b..558f904 100644 --- a/run_once_before_install_main_deps.sh.tmpl +++ b/run_once_before_install_main_deps.sh.tmpl @@ -1,5 +1,5 @@ #!/usr/bin/env bash -BASE_PACKAGES="kitty-terminfo gpg git curl wget ripgrep fd-find unzip python3-pip htop fzf bat" +BASE_PACKAGES="kitty-terminfo gpg git curl wget ripgrep fd-find unzip python3-pip htop fzf bat awk" USER=$(whoami) Green='\033[0;32m' # Green NC='\033[0m' # No Color diff --git a/run_onchange_before_authorized_keys.sh b/run_onchange_before_authorized_keys.sh new file mode 100644 index 0000000..f809c7b --- /dev/null +++ b/run_onchange_before_authorized_keys.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old 2>/dev/null || true + +##print only unique lines +cat ~/.ssh/authorized_keys.old <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdqIDeRKDOh7NQDcqnmLH/6M0ys7Wt/SEnF6ZYqroiH") 2>/dev/null | awk '!seen[$1]++' > ~/.ssh/authorized_keys + +