Skip to content

Commit

Permalink
Make scripts compatible with older versions of bash
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed Jun 24, 2024
1 parent 9c36c50 commit 15d496a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions util/scripts/check-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions util/scripts/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 15d496a

Please sign in to comment.