Updating for Plasma

This commit is contained in:
2024-01-21 17:42:05 +00:00
parent c7c78f26b7
commit 32c0d93f45
11 changed files with 142 additions and 81 deletions

View File

@@ -5,7 +5,7 @@ echo "Setting up SSH"
# Extract the login details from enpass
LABS=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Labs" 2>&1)
LABSUN=$(echo "$LABS" | grep -Po "(?<=login: )\w+")
LABSPW=$(echo "$LABS" | grep -Po "(?<=pass : ).+(?=\")")
LABSPW=$(echo "$LABS" | grep -Po "(?<=password: ).+(?=\")")
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
TITLE="$USER@$(cat /etc/hostname)" # The title for the SSH key
@@ -62,14 +62,14 @@ curl -X POST \
HTTP_REPLACE="s/https:\/\/labs\.scarif\.space\//git@labs.scarif.space:/"
for dir in $(ls "$HOME/.local/src"); do
dir="$HOME/.local/src/$dir"
if [ -d $dir ]; then
cd "$dir"
SSH_URL=$(git remote get-url origin | sed "$HTTP_REPLACE")
git remote set-url origin "$SSH_URL"
fi
done
# for dir in $(ls "$HOME/.local/src"); do
# dir="$HOME/.local/src/$dir"
# if [ -d $dir ]; then
# cd "$dir"
# SSH_URL=$(git remote get-url origin | sed "$HTTP_REPLACE")
# git remote set-url origin "$SSH_URL"
# fi
# done
DOTFILES_SSH_URL=$(git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote get-url origin | sed "$HTTP_REPLACE")
git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote set-url origin "$DOTFILES_SSH_URL"