summaryrefslogtreecommitdiff
path: root/staging/src/github.com
diff options
context:
space:
mode:
authorwbc6080 <wangbincheng4@huawei.com>2023-11-30 14:40:03 +0800
committerwbc6080 <wangbincheng4@huawei.com>2023-11-30 14:40:03 +0800
commit281471f6f67a271d2ddc55d6eab00fc45c74a5bf (patch)
tree5dcc82806d3a8a62e5bed1ef903d75c6d5a1d674 /staging/src/github.com
parentMerge pull request #5222 from lishaokai1995/master (diff)
downloadkubeedge-281471f6f67a271d2ddc55d6eab00fc45c74a5bf.tar.gz
update generate.sh in mapper-framework
Signed-off-by: wbc6080 <wangbincheng4@huawei.com>
Diffstat (limited to 'staging/src/github.com')
-rwxr-xr-xstaging/src/github.com/kubeedge/mapper-framework/hack/make-rules/generate.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/staging/src/github.com/kubeedge/mapper-framework/hack/make-rules/generate.sh b/staging/src/github.com/kubeedge/mapper-framework/hack/make-rules/generate.sh
index 7003f4c7b..7d955ec58 100755
--- a/staging/src/github.com/kubeedge/mapper-framework/hack/make-rules/generate.sh
+++ b/staging/src/github.com/kubeedge/mapper-framework/hack/make-rules/generate.sh
@@ -11,10 +11,14 @@ MAPPER_DIR="$(cd "$(dirname "$ROOT_DIR")" && pwd -P)"
function entry() {
# copy template
- read -p "Please input the mapper name (like 'Bluetooth', 'BLE'): " -r mapperName
- if [[ -z "${mapperName}" ]]; then
- echo "the mapper name is required"
- exit 1
+ if [ $# -eq 0 ] ;then
+ read -p "Please input the mapper name (like 'Bluetooth', 'BLE'): " -r mapperName
+ if [[ -z "${mapperName}" ]]; then
+ echo "the mapper name is required"
+ exit 1
+ fi
+ else
+ mapperName=$1
fi
mapperNameLowercase=$(echo -n "${mapperName}" | tr '[:upper:]' '[:lower:]')
mapperPath="${MAPPER_DIR}/${mapperNameLowercase}"