Module: kamailio
Branch: 5.7
Commit: bfbabc3407b984028fd47afdfde5217aef3d6fe5
URL:
https://github.com/kamailio/kamailio/commit/bfbabc3407b984028fd47afdfde5217…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2023-10-07T09:38:01+08:00
pkg/kamailio/scripts: wrap param around quotes to avoid invalid syntax on empty
Cherry-pick from 18b23187dd
---
Modified: pkg/kamailio/scripts/create-src-rpm.sh
Modified: pkg/kamailio/scripts/git-archive-all.sh
---
Diff:
https://github.com/kamailio/kamailio/commit/bfbabc3407b984028fd47afdfde5217…
Patch:
https://github.com/kamailio/kamailio/commit/bfbabc3407b984028fd47afdfde5217…
---
diff --git a/pkg/kamailio/scripts/create-src-rpm.sh
b/pkg/kamailio/scripts/create-src-rpm.sh
index ebe792a22bb..febe3b118fb 100755
--- a/pkg/kamailio/scripts/create-src-rpm.sh
+++ b/pkg/kamailio/scripts/create-src-rpm.sh
@@ -8,8 +8,8 @@ usage() {
# creates a src.rpm for mock
VER=$1
REL=$2
-[[ -n $VER ]] || { echo "Version not specified"; usage; exit 1; }
-[[ -n $REL ]] || { echo "Release not specified"; usage; exit 2; }
+[[ -n "$VER" ]] || { echo "Version not specified"; usage; exit 1; }
+[[ -n "$REL" ]] || { echo "Release not specified"; usage; exit 2; }
git submodule update --init
diff --git a/pkg/kamailio/scripts/git-archive-all.sh
b/pkg/kamailio/scripts/git-archive-all.sh
index 4c85ca83cc4..d0ca6338d71 100755
--- a/pkg/kamailio/scripts/git-archive-all.sh
+++ b/pkg/kamailio/scripts/git-archive-all.sh
@@ -6,13 +6,13 @@ usage() {
echo Usage: pkg/kamailio/scripts/git-archive-all.sh kamailio-5.8.0
../output/kamailio-5.8.0_src
}
-if [ -z $1 ]; then
+if [ -z "$1" ]; then
echo "You must specify a prefix name."
usage
exit 1
fi
-if [ -z $2 ]; then
+if [ -z "$2" ]; then
echo "You must specify a super-archive name."
usage
exit 1