summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-15 11:40:06 +0200
committerErich Eckner <git@eckner.net>2017-06-15 11:40:06 +0200
commit2c4bd582619e6ab73d613b000128886232dbafc9 (patch)
treeab96bbf9f9dc7e02d8e20d944bb50c26d61b286d
parent6c9ef1ccaca1763d6a9e46c71ed9c67f6139c5bc (diff)
downloadbuilder-2c4bd582619e6ab73d613b000128886232dbafc9.tar.xz
bin/common-functions: remove some more bashisms
-rwxr-xr-xbin/common-functions11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/common-functions b/bin/common-functions
index c3301f0..2f9c115 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -199,7 +199,7 @@ generate_package_metadata() {
sed -i '/=\s*$/d' "${file_prefix}.SRCINFO"
# extract "builds" = provides \cup pkgname
- grep '^\('$'\t''provides\|pkgname\) = ' "${file_prefix}.SRCINFO" | \
+ grep "$(printf '^\\(\tprovides\\|pkgname\\) = ')" "${file_prefix}.SRCINFO" | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \
sort -u > \
@@ -214,7 +214,7 @@ generate_package_metadata() {
# extract "needs" = ( makedepends \cup checkdepends ) \setminus "builds"
(
- grep '^'$'\t''\(makedepends\|checkdepends\) = ' "${file_prefix}.SRCINFO" | \
+ grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO" | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \
sort -u
@@ -226,8 +226,8 @@ generate_package_metadata() {
# extract "depends" = makedepends \cup checkdepends \cup depends
(
- sed -n '/^pkgname = /q;/^'$'\t''depends = /p' "${file_prefix}.SRCINFO"
- grep '^'$'\t''\(makedepends\|checkdepends\) = ' "${file_prefix}.SRCINFO"
+ sed -n "$(printf '/^pkgname = /q;/^\tdepends = /p')" "${file_prefix}.SRCINFO"
+ grep "$(printf '^\t\\(makedepends\\|checkdepends\\) = ')" "${file_prefix}.SRCINFO"
) | \
cut -d= -f2 | \
sed 's|^\s\+||; s|[<>]$||' | \
@@ -305,7 +305,8 @@ remove_old_package_versions() {
}
-# wait_some_time $minimum $maximum-$minimum
+# wait_some_time $minimum $diff
+# wait between minimum and minimum+diff seconds (diff defaults to 30)
wait_some_time() {
local minimum=$1
local diff=$2