minor changes

This commit is contained in:
Solomon Laing 2021-08-29 19:55:10 +09:30
parent 366223d09c
commit 9c41d25efe

View File

@ -31,6 +31,10 @@ function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
} }
if [ -d $HOME/.cfg ]; then
sudo rm -rf $HOME/.cfg
fi
git clone --bare https://gitlab.inkletblot.com/inkletblot/config.git $HOME/.cfg git clone --bare https://gitlab.inkletblot.com/inkletblot/config.git $HOME/.cfg
echo " echo "
@ -61,8 +65,8 @@ if [ $? = 0 ]; then
echo "Checked out config."; echo "Checked out config.";
else else
echo "Backing up pre-existing dot files."; echo "Backing up pre-existing dot files.";
mkdir -p .config-backup mkdir -p $HOME/.config-backup
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv $HOME/{} .config-backup/{} config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv $HOME/{} $HOME/.config-backup/{}
fi; fi;
case $choice in case $choice in