Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/rebuildpkgs.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-03-28 19:14:54 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2017-04-20 00:23:25 -0400
commitf52d44084734e30e795205162f4ab142f0fef181 (patch)
tree9f43447c665a28c6b20425b06f428ebcf44f2512 /rebuildpkgs.in
parent3d9d47697c768a04504638495489c4ac83565275 (diff)
Make slightly more involved changes to make shellcheck happy.
- Use `read -r` instead of other forms of read or looping - Use arrays instead of strings with whitespaces. - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1)
Diffstat (limited to 'rebuildpkgs.in')
-rw-r--r--rebuildpkgs.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/rebuildpkgs.in b/rebuildpkgs.in
index be3fd33..5f3e716 100644
--- a/rebuildpkgs.in
+++ b/rebuildpkgs.in
@@ -40,7 +40,7 @@ bump_pkgrel() {
oldrel=$(grep 'pkgrel=' $pbuild | cut -d= -f2)
#remove decimals
- rel=$(echo $oldrel | cut -d. -f1)
+ rel=${oldrel%%.*}
newrel=$((rel + 1))
@@ -50,11 +50,12 @@ bump_pkgrel() {
pkg_from_pkgbuild() {
# we want the sourcing to be done in a subshell so we don't pollute our current namespace
export CARCH PKGEXT
+ # shellcheck source=/dev/null
(source PKGBUILD; echo "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT")
}
chrootdir="$1"; shift
-pkgs="$@"
+pkgs=("$@")
SVNPATH='svn+ssh://repos.archlinux.org/srv/repos/svn-packages/svn'
@@ -67,7 +68,7 @@ cd "$REBUILD_ROOT"
/usr/bin/svn co -N $SVNPATH
FAILED=""
-for pkg in $pkgs; do
+for pkg in "${pkgs[@]}"; do
cd "$REBUILD_ROOT/svn-packages"
msg2 "Building '%s'" "$pkg"