From 0eb2f5edeb35a174c8bd73fe74a5bab65661f287 Mon Sep 17 00:00:00 2001 From: "Cirujano Cuesta, Silvano" Date: Wed, 7 Nov 2018 13:30:03 +0000 Subject: [PATCH] kas-docker: make usage printing POSIX compatible The usage of 'echo -e' for printing the usage message is not POSIX conform and is not being supported in the default shell of Debian (dash). As the 'Rationale' of the POSIX 'printf' documentation states, it was created "due to irreconcilable differences in the various versions of echo extant" and it should provide better compatibility throughout different shells. Signed-off-by: Silvano Cirujano Cuesta --- kas-docker | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/kas-docker b/kas-docker index c277f31..7b3685f 100755 --- a/kas-docker +++ b/kas-docker @@ -29,17 +29,17 @@ set -e usage() { - echo "Usage: $0 [OPTIONS] { build | shell } KASFILE" - echo " $0 [OPTIONS] clean" - echo -e "\nPositional arguments:" - echo -e "build\t\tCheck out repositories and build target." - echo -e "shell\t\tRun a shell in the build environment." - echo -e "clean\t\tClean build artifacts, keep downloads." - echo -e "\nOptional arguments:" - echo -e "--isar\t\tUse kas-isar container to build Isar image." - echo -e "--docker-args\tAdditional arguments to pass to docker for" \ - "running the build." - echo -e "-v\t\tPrint operations." + printf "%b" "Usage: $0 [OPTIONS] { build | shell } KASFILE\n" + printf "%b" " $0 [OPTIONS] clean\n" + printf "%b" "\nPositional arguments:\n" + printf "%b" "build\t\tCheck out repositories and build target.\n" + printf "%b" "shell\t\tRun a shell in the build environment.\n" + printf "%b" "clean\t\tClean build artifacts, keep downloads.\n" + printf "%b" "\nOptional arguments:\n" + printf "%b" "--isar\t\tUse kas-isar container to build Isar image.\n" + printf "%b" "--docker-args\tAdditional arguments to pass to docker for" \ + "running the build.\n" + printf "%b" "-v\t\tPrint operations.\n" exit 1 }