From 0549d394617ae5188223a16822a5f9c0a849aa76 Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 8 Apr 2020 18:40:34 -0700 Subject: [PATCH 1/3] initial --- modules/services.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index 04f57c3f26..36b0ed359f 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -12,7 +12,10 @@ function services { for file in $SERVICES/* do if [[ ! $file = *"README.md"* ]]; then - echo "${file##*/}" | sed -e 's/^install-//' -e 's/.sh$//' + service=$(echo "${file##*/}" | sed -e 's/^install-//' -e 's/.sh$//') + if check_arm $service; then + echo $service + fi fi done else @@ -86,6 +89,12 @@ function services { else check_available_services $service_name check_arm $service_name + if ! check_arm $service_name; then + echo "ERROR: unsupported arm" + echo "user arm: $(detectarm)" + echo "supported arm(s): ${arms[*]}" + exit 1 + fi case "$command" in install) checkargn $# 2 @@ -393,11 +402,11 @@ function check_arm { return 0 fi done - echo "ERROR: unsupported arm" - echo "user arm: $(detectarm)" - echo "supported arm(s): ${arms[*]}" - exit 1 - # return 1 + # echo "ERROR: unsupported arm" + # echo "user arm: $(detectarm)" + # echo "supported arm(s): ${arms[*]}" + # exit 1 + return 1 } function check_available_services { From 08e809a52d391f29fc677eea2d722ea963181cdb Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 8 Apr 2020 18:53:40 -0700 Subject: [PATCH 2/3] remove check_arm --- modules/services.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index 36b0ed359f..1e2b779267 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -88,13 +88,6 @@ function services { exit 1 else check_available_services $service_name - check_arm $service_name - if ! check_arm $service_name; then - echo "ERROR: unsupported arm" - echo "user arm: $(detectarm)" - echo "supported arm(s): ${arms[*]}" - exit 1 - fi case "$command" in install) checkargn $# 2 @@ -402,10 +395,6 @@ function check_arm { return 0 fi done - # echo "ERROR: unsupported arm" - # echo "user arm: $(detectarm)" - # echo "supported arm(s): ${arms[*]}" - # exit 1 return 1 } From 1c1d1304aef0cb539645add122b4c0b55a083c91 Mon Sep 17 00:00:00 2001 From: dogi Date: Thu, 9 Apr 2020 02:06:37 -0400 Subject: [PATCH 3/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 284e5fb5d8..cd23e49fcd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.17.19", + "version": "1.17.21", "remote": "2251", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh",