From 3d918611a7da82247377abf1f12300387ce33c40 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Mon, 30 Nov 2020 12:26:22 +0000
Subject: [PATCH] Removed testing comments and unused spaces. added todo
---
README.org | 1 +
main.sh | 22 ++++++++--------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/README.org b/README.org
index 7933a15..8fd5044 100755
--- a/README.org
+++ b/README.org
@@ -48,3 +48,4 @@
# - Create a universal variables file :: Not sure how useful this would be, but could be nice
# - Build parallelism :: Try and make packages build in parallel, place a lock on the repo file.
# - Add or remove multiple packages at a time :: Make it less tedious to add packages
+- Keep multiple old packages :: Keep so that packages can be downloaded even if repository isn't upgraded. Also allow downgrading
diff --git a/main.sh b/main.sh
index 76e3f63..f2a4f4a 100755
--- a/main.sh
+++ b/main.sh
@@ -76,7 +76,7 @@
ver=$pkgver
fi
find . -mindepth 1 -maxdepth 1 -type f \( -name "*.pkg.tar.*" -o -name "*.src.tar.*" \) -not -name "*$ver-$pkgrel*" -delete
-
+
#Get build artifact names from PKGBUILD and build artifacts
#Remove duplicates from the list
pkgs=()
@@ -111,7 +111,7 @@
cp $i $REPODIR/
[[ "$SIGN" == "Y" ]] && cp $i.sig $REPODIR/
done
- else
+ else
return;
fi
@@ -129,9 +129,7 @@
while true; do
# Wait until package is at the top of the queue and add to db
if [[ "$(head -n1 $WAITLIST)" == "$1" ]]; then
- # for i in ${pkgs[@]}; do
- repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.$([ -n "$COMPRESSION" ] || echo $COMPRESSION && echo zst) ${pkgs[@]}
- # done
+ repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.$([ -n "$COMPRESSION" ] || echo $COMPRESSION && echo zst) ${pkgs[@]}
while true; do
if [[ $(cat $WAITLIST_LCK) == 1 ]]; then
sleep 1
@@ -201,8 +199,6 @@
#Adding build dependencies is
# Usage: add [package name]
function add {
- echo @: $@
-# read
local i j k
for i in $@; do
cd $BUILDDIR
@@ -217,7 +213,7 @@
local makedeps
source PKGBUILD
- #check for all build dependencies
+ #Check for all build dependencies
for j in ${makedepends[@]}; do
k=$(echo $j | sed 's/[>]=.*//g')
if ! pacman -Si $k; then
@@ -230,18 +226,15 @@
makedeps+=($k)
fi &>/dev/null
done
- echo $i: ${makedeps[@]}
-# read
+
+ #Add dependencies and update so overall build can work
for j in ${makedeps[@]}; do
add $j
-# read
done
- echo $i: ${makedeps[@]}
-# read
if [[ -n "${makedeps[@]}" ]]; then
sudo pacman -Sy
fi
-#read
+
#Actually build wanted package
cd $BUILDDIR/$i
build_pkg $i -f
@@ -288,6 +281,7 @@
rm -f $TMPFILE
}
+#Check helper function
function check_pkg {
if [[ -z "$(curl -sI "https://aur.archlinux.org/packages/$2" | head -n1 | grep 200)" ]]; then
echo "$2" >> $1
--
Gitblit v1.10.0