Updated Dotfiles location

This commit is contained in:
2022-11-12 21:13:02 +00:00
parent 0040da9508
commit 1fd34083d4
2 changed files with 15 additions and 14 deletions
+5 -5
View File
@@ -157,16 +157,16 @@ function pullall() {
done
}
# Pull Dotfiles inside ~/git/dotfiles
# Pull Dotfiles inside ~/.dotfiles/
function pulldots() {
# Check if folders are there and if its Master or Main
if [ "$(grep -c -i ""master"" ~/git/dotfiles/.git/config )" -gt 0 ]; then
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling master branch..." && cd ~/git/dotfiles && git checkout master && git pull && cd $CURRENTDIR && echo ""
if [ "$(grep -c -i ""master" "~/.dotfiles/.git/config )" -gt 0 ]; then
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling master branch..." && cd ~/.dotfiles/ && git checkout master && git pull && cd $CURRENTDIR && echo ""
elif [ "$(grep -c -i ""main"" ~/git/dotfiles/.git/config )" -gt 0 ]; then
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling main branch..." && cd ~/git/dotfiles && git checkout main && git pull && cd $CURRENTDIR && echo ""
elif [ "$(grep -c -i ""main" "~/.dotfiles/.git/config )" -gt 0 ]; then
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling main branch..." && cd ~/.dotfiles/ && git checkout main && git pull && cd $CURRENTDIR && echo ""
else
echo "I can't seem to file any dotfiles folders" && echo ""