diff options
author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-09 22:00:04 +0100 |
---|---|---|
committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-09 22:00:04 +0100 |
commit | dbdd08b946d06b2ff6cab1a2b6da3fd18f8128f1 (patch) | |
tree | ef6b140f07633da048234d5a5be20b46695becb1 | |
parent | f18e9b4ebce97e220f3197d35608366f66896064 (diff) |
updates script for contribs to void
- adds cleaning repocache at the start, after binary bootstrap
- linting
- check (run the package checks)
-rwxr-xr-x | auto-void-packages/update-package.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/auto-void-packages/update-package.sh b/auto-void-packages/update-package.sh index a21dd6c..155e3e3 100755 --- a/auto-void-packages/update-package.sh +++ b/auto-void-packages/update-package.sh @@ -14,10 +14,13 @@ printf "path (optional): path of architectures file, defaults to '\$HOME/workben PKG="$1" VER="$2" archs_fp="${3:-$HOME/workbench/auto-void-packages/architectures.txt}" +template_path="srcpkgs/$PKG/template" printf "Updating %s to %s.\n" "$PKG" "$VER" pushd ~/workbench/void-packages || exit 1 +./xbps-src binary-bootstrap && ./xbps-src clean-repocache + git checkout master git checkout -b "$PKG-update" || ( \ git checkout master &&\ @@ -25,17 +28,21 @@ git checkout -b "$PKG-update" || ( \ git checkout -b "$PKG-update" ) || \ exit 1 -sed -i "s/version=.*/version=$VER/g" "srcpkgs/$PKG/template" -sed -i "s/revision=.*/revision=1/g" "srcpkgs/$PKG/template" +sed -i "s/version=.*/version=$VER/g" "$template_path" +sed -i "s/revision=.*/revision=1/g" "$template_path" xgensum -f -i "$PKG" ; xgensum -f -i "$PKG" || exit 1 +xlint "$template_path" || exit 1 + [ -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 +./xbps-src check "$PKG" || exit 1 + +sudo xbps-install -S --repository="hostdir/binpkgs/$PKG-update" "$PKG" && $PKG --version popd || exit 1 |