aboutsummaryrefslogtreecommitdiff
path: root/auto-void-packages/update-package.sh
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2024-10-15 22:02:54 +0200
committerclyhtsuriva <aimeric@adjutor.xyz>2024-10-15 22:02:54 +0200
commitfc05941c60194547286fdceb93b5a0fc85545310 (patch)
tree06640841f6466f606b69fb1d3af0dacbe5e7af18 /auto-void-packages/update-package.sh
parent6bb700b04a3b393dfdda5500b104b815c289109a (diff)
Continuing auto-build script
Also adding the option to put a custom path for the build architectures file
Diffstat (limited to 'auto-void-packages/update-package.sh')
-rwxr-xr-xauto-void-packages/update-package.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/auto-void-packages/update-package.sh b/auto-void-packages/update-package.sh
index 8707626..a21dd6c 100755
--- a/auto-void-packages/update-package.sh
+++ b/auto-void-packages/update-package.sh
@@ -3,15 +3,17 @@
helpy(){
-printf "command: %s <package> <version>\n" "$0"
+ printf "command: %s <package> <version> [path]\n" "$0"
printf "package: package name\n"
printf "version: version update\n"
+printf "path (optional): path of architectures file, defaults to '\$HOME/workbench/auto-void-packages/architectures.txt'\n"
}
[ -z "$1" ] || [ -z "$2" ] && helpy && exit 1
PKG="$1"
VER="$2"
+archs_fp="${3:-$HOME/workbench/auto-void-packages/architectures.txt}"
printf "Updating %s to %s.\n" "$PKG" "$VER"
pushd ~/workbench/void-packages || exit 1
@@ -28,11 +30,10 @@ sed -i "s/revision=.*/revision=1/g" "srcpkgs/$PKG/template"
xgensum -f -i "$PKG" ; xgensum -f -i "$PKG" || exit 1
-ARCHS_FILE="$HOME/workbench/auto-void-packages/architectures.txt"
-[ -f "$ARCHS_FILE" ] && rm -v "$ARCHS_FILE"
-./xbps-src -a armv7l pkg "$PKG" && echo " - armv7l" >> "$ARCHS_FILE"
-./xbps-src -a armv6l-musl pkg "$PKG" && echo " - armv6l-musl" >> "$ARCHS_FILE"
-./xbps-src -a aarch64-musl pkg "$PKG" && echo " - aarch64-musl" >> "$ARCHS_FILE"
+[ -f "$archs_fp" ] && rm -v "$archs_fp"
+./xbps-src -a armv7l pkg "$PKG" && echo " - armv7l" >> "$archs_fp"
+./xbps-src -a armv6l-musl pkg "$PKG" && echo " - armv6l-musl" >> "$archs_fp"
+./xbps-src -a aarch64-musl pkg "$PKG" && echo " - aarch64-musl" >> "$archs_fp"
./xbps-src pkg "$PKG" || exit 1
xi -S --repository="hostdir/binpkgs/$PKG-update" "$PKG" && $PKG --version