about to test the package fetching..
This commit is contained in:
parent
b225b1a609
commit
e8f5d6d0d9
0
_bin/sign.pkg.sh
Normal file → Executable file
0
_bin/sign.pkg.sh
Normal file → Executable file
42
_bin/submodule.update.sh
Normal file → Executable file
42
_bin/submodule.update.sh
Normal file → Executable file
@ -34,19 +34,39 @@ function freshenrepo () {
|
|||||||
REPO="${1}"
|
REPO="${1}"
|
||||||
|
|
||||||
# Check to see if it exists. https://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
|
# Check to see if it exists. https://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
|
||||||
git config --file .gitmodules --get-regexp path | awk '{ print $2 }' | egrep -Eq "^${REPO}"
|
# We COULD use 'if git submodule status "${REPO}"' but we don't because regexes are cooler. so there. deal with it. /me puts on cool guy sunglasses.
|
||||||
|
git config --file .gitmodules --get-regexp path | awk '{ print $2 }' | egrep -Eq "^${REPO}$"
|
||||||
if [[ "${?}" -eq '0' ]];
|
if [[ "${?}" -eq '0' ]];
|
||||||
then
|
then
|
||||||
# We remove it so we can grab a fresh copy directly from the AUR.
|
# We remove it so we can grab a fresh copy directly from the AUR.
|
||||||
#https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule
|
#https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule and others
|
||||||
git rm --cached ${REPO}
|
git submodule deinit -f "${REPO}"
|
||||||
git submodule deinit ${REPO}
|
git rm -f "${REPO}"
|
||||||
|
git config -f .gitmodules --remove-section "submodule.${REPO}" > /dev/null 2>&1 # probably not necessary,...
|
||||||
|
rm -rf .git/modules/${REPO}
|
||||||
|
fi
|
||||||
|
touch .gitmodules
|
||||||
|
git add .gitmodules
|
||||||
|
git submodule add ${URI}:${REPO}
|
||||||
|
cat >> .git/modules/${REPO}/hooks/pre-commit << EOF
|
||||||
|
#!/bin/bash
|
||||||
|
/usr/bin/mksrcinfo
|
||||||
|
|
||||||
|
git add .SRCINFO
|
||||||
|
EOF
|
||||||
|
chmod 700 .git/modules/${REPO}/hooks/pre-commit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if [[ "${PKGNAME}" =~ [Aa][Ll]{2} ]];
|
||||||
for i in $(ssh aur@aur.archlinux.org list-repos | sed -e 's/[[:space:]]*//g' | sort);
|
then
|
||||||
do
|
for i in $(ssh aur@aur.archlinux.org list-repos | sed -e 's/[[:space:]]*//g' | sort);
|
||||||
freshenrepo ${i}
|
do
|
||||||
done
|
freshenrepo ${i}
|
||||||
|
done
|
||||||
|
elif [ -n "${PKGNAME}" ];
|
||||||
|
then
|
||||||
|
freshenrepo ${PKGNAME}
|
||||||
|
fi
|
||||||
|
|
||||||
|
git submodule update
|
||||||
|
Loading…
Reference in New Issue
Block a user