seriously

This commit is contained in:
Phillip Nicholas Thern 2022-08-02 17:07:34 +02:00
parent 02a3a65c43
commit 60ea337d0b
Signed by: nickveliki
GPG Key ID: 9810EF8F924EDF0C
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,7 @@
name=$(git config -f ~/.git.d/$1 --get user.name )
email=$(git config -f ~/.git.d/$1 --get user.email )
echo "profile = $1 name = $name email = $email"
git config user.name = $name
git config user.email = $email
#!/bin/bash
profile=$1
name=$(git config -f ~/.git.d/$profile --get user.name )
email=$(git config -f ~/.git.d/$profile --get user.email )
echo "profile = $profile name = $name email = $email"
git config --local user.name $name
git config --local user.email $email

View File

@ -17,7 +17,7 @@ git config --global alias.profile-set "!bash -c \"git config -f ~/.git.d/\$1 \$2
else
echo "profile-set alias already defined in git"
fi
echo $(cat .git-switch-user) > ~/.git-switch-user
cp ./.git-switch-user ~/.git-switch-user
chmod +x ~/.git-switch-user
direx=$(ls ~/ -al| grep .git.d | wc -l)
if [ $direx = "0" ]; then