Added possibility to change to ssh on dotfiles repo

This commit is contained in:
Jonas Forsberg 2020-08-05 07:52:21 +02:00
parent efab21e9d1
commit 667d0a6cac

View File

@ -7,6 +7,7 @@
DOTFILES_REPO="$HOME/.dotfiles" DOTFILES_REPO="$HOME/.dotfiles"
DOTFILES_REMOTE="https://git.rre.nu:443/jonas/dotfiles.git" DOTFILES_REMOTE="https://git.rre.nu:443/jonas/dotfiles.git"
DOTFILES_REMOTE_SSH="ssh://git@curry.rre.nu:3022/jonas/dotfiles.git"
DOTFILES_RENAME_EXISTING_FILES=( DOTFILES_RENAME_EXISTING_FILES=(
.bashrc .bashrc
@ -100,6 +101,13 @@ function setup_dotfiles(){
log "fetching dotfiles" log "fetching dotfiles"
$dotf fetch origin $dotf fetch origin
$dotf checkout master $dotf checkout master
printf "Do you want to switch to SSH remote on dotfiles [N/y]? "
read -r -n 1 -s answer
if [[ $answer == [Yy] ]];then
$dotf remote set-url origin "$DOTFILES_REMOTE_SSH"
fi
} }
function do_salt_call(){ function do_salt_call(){