From fc05941c60194547286fdceb93b5a0fc85545310 Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Tue, 15 Oct 2024 22:02:54 +0200 Subject: Continuing auto-build script Also adding the option to put a custom path for the build architectures file --- auto-void-packages/commit-push-pr.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'auto-void-packages/commit-push-pr.sh') diff --git a/auto-void-packages/commit-push-pr.sh b/auto-void-packages/commit-push-pr.sh index 1352c73..769a3cd 100755 --- a/auto-void-packages/commit-push-pr.sh +++ b/auto-void-packages/commit-push-pr.sh @@ -3,10 +3,11 @@ helpy(){ -printf "command: %s \n" "$0" +printf "command: %s [path]\n" "$0" printf "package: package name\n" printf "version: version update\n" printf "tested: yes/briefly/no\n" +printf "path (optional): path of architectures file, defaults to '\$HOME/workbench/auto-void-packages/architectures.txt'\n" } @@ -14,6 +15,7 @@ printf "tested: yes/briefly/no\n" PKG="$1" VER="$2" TESTED="$3" +archs_fp="${4:-$HOME/workbench/auto-void-packages/architectures.txt}" printf "Updating %s to %s.\n" "$PKG" "$VER" pushd ~/workbench/void-packages || exit 1 @@ -22,7 +24,7 @@ git add "srcpkgs/$PKG" && \ git commit -m "$PKG: update to $VER" && \ git push origin "$PKG-update" -ARCHS=$(/bin/cat "$HOME/workbench/auto-void-packages/architectures.txt") +ARCHS=$(/bin/cat "$archs_fp") gh pr create \ --title "$PKG: update to $VER" \ -- cgit v1.2.3