Use alias config instead of variable

This commit is contained in:
2024-05-29 21:34:12 +00:00
parent cb9afbe670
commit 50ca110e25

View File

@@ -95,7 +95,7 @@ unset _osname
# clone dotfiles for fast startup # clone dotfiles for fast startup
GIT_DIR=$HOME/Development/nemoinho/gitea.nehrke.info/nemoinho/dotfiles GIT_DIR=$HOME/Development/nemoinho/gitea.nehrke.info/nemoinho/dotfiles
config='/usr/bin/git --git-dir '"$GIT_DIR"' --work-tree '"$HOME"'' alias config='/usr/bin/git --git-dir '"$GIT_DIR"' --work-tree '"$HOME"''
if [ ! -d "$GIT_DIR" ] if [ ! -d "$GIT_DIR" ]
then then
GIT_REMOTE=git@gitea.nehrke.info:nemoinho/dotfiles.git GIT_REMOTE=git@gitea.nehrke.info:nemoinho/dotfiles.git
@@ -103,11 +103,10 @@ then
git clone --separate-git-dir=$GIT_DIR $GIT_REMOTE $HOME/tmp-dotfiles git clone --separate-git-dir=$GIT_DIR $GIT_REMOTE $HOME/tmp-dotfiles
rm -r ~/tmp-dotfiles rm -r ~/tmp-dotfiles
else else
$config pull config pull
fi fi
alias config="$config" config config --local status.showUntrackedFiles no
$config config --local status.showUntrackedFiles no config checkout
$config checkout
# reload bash_profile to configure the current shell with the just installed dotfiles # reload bash_profile to configure the current shell with the just installed dotfiles
. ~/.bash_profile . ~/.bash_profile