Fixed pulldots
This commit is contained in:
parent
916df06461
commit
d170745571
34
.aliases
34
.aliases
@ -163,18 +163,28 @@ function pullall() {
|
|||||||
|
|
||||||
# Pull Dotfiles inside ~/.dotfiles/
|
# Pull Dotfiles inside ~/.dotfiles/
|
||||||
function pulldots() {
|
function pulldots() {
|
||||||
|
# Check if folders are there and if its Master or Main
|
||||||
# Check if folders are there and if its Master or Main
|
if grep -q -i "master" ~/.dotfiles/.git/config; then
|
||||||
if [ "$(grep -c -i ""master" "~/.dotfiles/.git/config )" -gt 0 ]; then
|
CURRENTDIR=$(pwd)
|
||||||
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling master branch..." && cd ~/.dotfiles/ && git checkout master && git pull && cd $CURRENTDIR && echo ""
|
echo "dotfiles Found, Pulling master branch..."
|
||||||
|
cd ~/.dotfiles/
|
||||||
|
git checkout master
|
||||||
elif [ "$(grep -c -i ""main" "~/.dotfiles/.git/config )" -gt 0 ]; then
|
git pull
|
||||||
CURRENTDIR=$(pwd) && echo "dotfiles Found, Pulling main branch..." && cd ~/.dotfiles/ && git checkout main && git pull && cd $CURRENTDIR && echo ""
|
cd "$CURRENTDIR"
|
||||||
|
echo ""
|
||||||
else
|
|
||||||
echo "I can't seem to file any dotfiles folders" && echo ""
|
elif grep -q -i "main" ~/.dotfiles/.git/config; then
|
||||||
fi
|
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 ""
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## TEST FIX
|
## TEST FIX
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user