From 15d496aa7fdf5023a253f3773cb02601c8fbc2f3 Mon Sep 17 00:00:00 2001 From: Julian Kniephoff Date: Mon, 24 Jun 2024 18:01:06 +0200 Subject: [PATCH] Make scripts compatible with older versions of `bash` --- util/scripts/check-system.sh | 4 ++-- util/scripts/make-release.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/util/scripts/check-system.sh b/util/scripts/check-system.sh index 862eef3df..83c187cd7 100755 --- a/util/scripts/check-system.sh +++ b/util/scripts/check-system.sh @@ -8,11 +8,11 @@ has_command() { } print_yes() { - echo -e " → \e[1;32mYes\e[0m" + echo -e " → \x1b[1;32mYes\x1b[0m" } print_no() { - echo -e " → \e[1;31mNo\e[0m" + echo -e " → \x1b[1;31mNo\x1b[0m" } # Checks if $1 >= $2 with both parameters treated as version numbers. diff --git a/util/scripts/make-release.sh b/util/scripts/make-release.sh index 47c802c07..1e7d9683f 100755 --- a/util/scripts/make-release.sh +++ b/util/scripts/make-release.sh @@ -48,7 +48,7 @@ old_major=${old_version_without_patch%.*} old_minor=${old_version_without_patch#*.} -echo -e "Bumping \e[1;94mv$old_major.$old_minor\e[0m → \e[1;92mv$major.$minor\e[0m" +echo -e "Bumping \x1b[1;94mv$old_major.$old_minor\x1b[0m → \x1b[1;92mv$major.$minor\x1b[0m" # Make sure it's a valid version bump if (( ! ( (major == old_major + 1 && minor == 0) || (major == old_major && minor == old_minor + 1 ) ) )); then @@ -88,17 +88,17 @@ echo "(Pushing to $GIT_REMOTE. Make sure you have push access.)" echo "To cancel, ctrl+c! To continue, press enter." read -r git commit -m "Bump version to $major.$minor" -echo -e "\e[1;32m✔ Committed version bump\e[0m" +echo -e "\x1b[1;32m✔ Committed version bump\x1b[0m" echo git tag "$tag_name" -echo -e "\e[1;32m✔ Created tag $tag_name\e[0m" +echo -e "\x1b[1;32m✔ Created tag $tag_name\x1b[0m" echo git push $GIT_REMOTE "$tag_name" -echo -e "\e[1;32m✔ Pushed tag\e[0m" +echo -e "\x1b[1;32m✔ Pushed tag\x1b[0m" echo git push $GIT_REMOTE master -echo -e "\e[1;32m✔ Pushed to master\e[0m" +echo -e "\x1b[1;32m✔ Pushed to master\x1b[0m" echo