From 2c4bd582619e6ab73d613b000128886232dbafc9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 15 Jun 2017 11:40:06 +0200 Subject: bin/common-functions: remove some more bashisms --- bin/common-functions | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/common-functions') 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 -- cgit v1.2.3-70-g09d2