summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 8b842ff..eb61e9e 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -2,7 +2,7 @@
# contains functions used by more than one script
-# shellcheck disable=SC2039,SC2119,SC2120
+# shellcheck disable=SC2039,SC2119,SC2120,SC3043
if [ -z "${base_dir}" ]; then
# just to make shellcheck happy
@@ -277,8 +277,8 @@ remove_old_package_versions() {
# wait between minimum and minimum+diff seconds (diff defaults to 30)
wait_some_time() {
- local minimum=$1
- local diff=$2
+ local minimum="$1"
+ local diff="$2"
local random
if [ -z "${diff}" ]; then
@@ -358,6 +358,7 @@ make_source_info() {
p
' "${tmp_dir}/SRCINFO"
)"
+ # shellcheck disable=SC2031
sed -i '
/^pkgname = /! b
/= gtk-doc$/ b
@@ -447,7 +448,7 @@ mangle_pkgbuild() {
/^arch=[^#]*any/!{
/^arch=(/s/(/(i486 i686 pentium4 /
}
- s/^\(\s*pkgrel=\)['"'"'"]\?\([0-9.]\+\)['"'"'"]\?\s*\(#.*\)\?$/\1"\2'"${sub_pkgrel}"'"/
+ s/^\(\s*pkgrel=\)['"'"'"]\?\([0-9]\+\)\(\.[0-9.]*\)\?['"'"'"]\?\s*\(#.*\)\?$/\1"\2'"${sub_pkgrel:-\\3}"'"/
' "${PKGBUILD}"
# shellcheck disable=SC2016
@@ -778,7 +779,7 @@ extract_pkgname_epoch_pkgver_pkgrel_sub_pkgrel_arch_from_package_name() {
}
# irc_say $channel [copy]
-# say content of stdin in irc channel $channel (default: #archlinux32)
+# say content of stdin in irc channel $channel (default: #archlinux32-devops)
# and print copy to stdout if 'copy' is given
# shellcheck disable=SC2120
@@ -786,7 +787,7 @@ irc_say() {
local channel
local content
if [ -z "$1" ]; then
- channel='#archlinux32'
+ channel='#archlinux32-devops'
else
channel="$1"
fi