summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-11-17 14:21:57 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2020-11-20 14:48:14 +0000
commit51651ac67efc9ba91e0859f4512b8d224e953ba2 (patch)
treec9acce49a05a8a96b8590229344c1ba70ee94ef7
parent066e68001e0b4f4a186be9e181031125504e3a5e (diff)
downloadglib-51651ac67efc9ba91e0859f4512b8d224e953ba2.tar.gz
ci: Fix backslash escaping in run-docker.sh
Spotted by shellcheck (warning SC1117): `\e` is not an actual escape sequence, so it’s interpreted as `\\e`. Best make that explicit. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rwxr-xr-x.gitlab-ci/run-docker.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 6299c5595..56b2b0a7d 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -46,7 +46,7 @@ while (($# > 0)); do
--base|-b) read_arg base "$@" || shift;;
--base-version) read_arg base_version "$@" || shift;;
--no-login) no_login=1;;
- *) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
+ *) echo -e "\\e[1;31mERROR\\e[0m: Unknown option '$1'"; exit 1;;
esac
shift
done
@@ -75,7 +75,7 @@ if [ $list == 1 ]; then
filename=$( basename -- "$f" )
basename="${filename%.*}"
- echo -e " \e[1;39m$basename\e[0m"
+ echo -e " \\e[1;39m$basename\\e[0m"
done
exit 0
fi
@@ -87,7 +87,7 @@ if [ -z "${base}" ]; then
fi
if [ ! -f "$base.Dockerfile" ]; then
- echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
+ echo -e "\\e[1;31mERROR\\e[0m: Dockerfile for '$base' not found"
exit 1
fi
@@ -100,7 +100,7 @@ fi
TAG="registry.gitlab.gnome.org/gnome/glib/${base}:${base_version}"
if [ $build == 1 ]; then
- echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
+ echo -e "\\e[1;32mBUILDING\\e[0m: ${base} as ${TAG}"
$SUDO_CMD docker build \
--build-arg HOST_USER_ID="$UID" \
--build-arg COVERITY_SCAN_PROJECT_NAME="${COVERITY_SCAN_PROJECT_NAME}" \
@@ -111,7 +111,7 @@ if [ $build == 1 ]; then
fi
if [ $push == 1 ]; then
- echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
+ echo -e "\\e[1;32mPUSHING\\e[0m: ${base} as ${TAG}"
if [ $no_login == 0 ]; then
$SUDO_CMD docker login registry.gitlab.gnome.org
@@ -122,7 +122,7 @@ if [ $push == 1 ]; then
fi
if [ $run == 1 ]; then
- echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
+ echo -e "\\e[1;32mRUNNING\\e[0m: ${base} as ${TAG}"
$SUDO_CMD docker run \
--rm \
--volume "$(pwd)/..:/home/user/app" \