mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08:36 -06:00
fix: Skip if AUR directory is missing
This commit is contained in:
parent
11a95a97e1
commit
60400b6495
1 changed files with 13 additions and 11 deletions
|
@ -19,17 +19,19 @@ VERS="$2"
|
||||||
echo "Updating AUR..."
|
echo "Updating AUR..."
|
||||||
cd "$GITDIR/AUR"
|
cd "$GITDIR/AUR"
|
||||||
[ -d "$1" ] && PKG="$1" || PKG="$1-bin"
|
[ -d "$1" ] && PKG="$1" || PKG="$1-bin"
|
||||||
|
if [ -d "$1" ]; then # Skip if the directory is missing
|
||||||
cd "$PKG"
|
cd "$PKG"
|
||||||
sed -i -E "s/pkgver=[0-9\.]+/pkgver=$VERS/" PKGBUILD
|
sed -i -E "s/pkgver=[0-9\.]+/pkgver=$VERS/" PKGBUILD
|
||||||
updpkgsums
|
updpkgsums
|
||||||
makepkg --printsrcinfo >.SRCINFO
|
makepkg --printsrcinfo >.SRCINFO
|
||||||
|
# Remove downloaded files
|
||||||
# Remove downloaded files
|
ls | grep -v PKGBUILD | xargs -r -I {} rm "{}"
|
||||||
ls | grep -v PKGBUILD | xargs -r -I {} rm "{}"
|
git add .
|
||||||
git add .
|
git commit -m "Bumped $PKG version to $VERS"
|
||||||
git commit -m "Bumped $PKG version to $VERS"
|
git push
|
||||||
git push
|
else
|
||||||
|
echo "AUR directory is missing. Skipping this step."
|
||||||
|
fi
|
||||||
|
|
||||||
# Update the GitHub backup repo as well
|
# Update the GitHub backup repo as well
|
||||||
echo "Updating AUR backup repo..."
|
echo "Updating AUR backup repo..."
|
||||||
|
|
Loading…
Reference in a new issue