summaryrefslogtreecommitdiff
path: root/rebuildpkgs.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2017-05-05 18:41:09 -0400
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-07-05 18:21:56 +0200
commita396a6908110a860a89a1e640153bac1e0da2a57 (patch)
treed568adf0637e0247173ccefddf391bb23e4fc7f5 /rebuildpkgs.in
parent78fabcfa0694ae8c81e1d5ec0e5dacaed533545e (diff)
downloaddevtools-a396a6908110a860a89a1e640153bac1e0da2a57.tar.xz
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.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/rebuildpkgs.in b/rebuildpkgs.in
index be3fd33..a0e8250 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))
@@ -54,7 +54,7 @@ pkg_from_pkgbuild() {
}
chrootdir="$1"; shift
-pkgs="$@"
+pkgs=("$@")
SVNPATH='svn+ssh://repos.archlinux.org/srv/repos/svn-packages/svn'
@@ -67,7 +67,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"