Modify sync to run fisher and set your git user

This commit is contained in:
Mitchell Simon 2019-08-17 02:12:45 -04:00
parent 998d686349
commit 02025ce81c
2 changed files with 25 additions and 1 deletions

View File

@ -44,3 +44,4 @@
[merge]
tool = kdiff3

25
sync
View File

@ -4,9 +4,32 @@ echo 'Syncing configuration files to your home dir...'
if ! test -e ~/.config; mkdir ~/.config; end
set_color brgrey
rsync -aP ./.config/fish ~/.config/
rsync -aP ./.gitconfig ~/
rsync -aP ./.tmux* ~/
rsync -aP ./.vim* ~/
set_color normal
echo
echo 'Done syncing.'
fisher
set -l prompt 'Would you like to set your git user name and email?'
read -l -p "set_color red; printf '\n$prompt (Y/n) '; set_color normal" set_git_user
if test -z "$set_git_user"; or test $set_git_user = 'y'; or test $set_git_user = 'Y'
read -l -P 'name: ' first_name last_name
set -l full_name $first_name
if test -n "$last_name"
set full_name "$full_name $last_name"
end
git config --global user.name $full_name
read -l -P 'email: ' email
git config --global user.email $email
end
echo -s \n 'Done syncing.'