rename .git instead

This commit is contained in:
Travis Burtrum 2017-05-15 13:07:26 -04:00
parent 3a0615f6ed
commit 17df38088e
1 changed files with 7 additions and 4 deletions

11
ppa
View File

@ -26,15 +26,16 @@ clone_update_aur() {
if [[ -d $REPLY ]] if [[ -d $REPLY ]]
then then
if [[ ! -d $REPLY/.git ]] if [[ ! -d $REPLY/.git-nosub ]]
then then
rm -rf tmp rm -rf tmp
git clone "$aurweb/$REPLY".git tmp git clone "$aurweb/$REPLY".git tmp
mv tmp/.git $REPLY mv tmp/.git "$REPLY"/.git-nosub
rm -rf tmp rm -rf tmp
fi fi
cd "$REPLY" cd "$REPLY"
mv .git-nosub .git
git fetch -v # returns 0 even if nothing was fetched git fetch -v # returns 0 even if nothing was fetched
git reset --hard HEAD git reset --hard HEAD
@ -44,8 +45,10 @@ clone_update_aur() {
else else
git clone "$aurweb/$REPLY".git git clone "$aurweb/$REPLY".git
fi fi
# .git folders make it a git submodule, we don't want that # .git folders make it a git submodule, we don't want that, need to gitignore .git-nosub
rm -rf "$REPLY"/.git/ mv "$REPLY"/.git "$REPLY"/.git-nosub
# we don't ever want to track these
rm -f "$REPLY"/.SRCINFO
done done
} }