diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2021-03-22 09:47:23 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2021-03-22 09:55:26 +0100 |
| commit | 475a65cbddb7648ee416cb53d85240fc82a22c70 (patch) | |
| tree | 088172523132510377859fbc61e7666a29bdda67 | |
| parent | a5ab5af1027ea2ac899d09707d2392d200c2c154 (diff) | |
| download | mullvadvpn-475a65cbddb7648ee416cb53d85240fc82a22c70.tar.xz mullvadvpn-475a65cbddb7648ee416cb53d85240fc82a22c70.zip | |
Echo error messages to stderr
| -rwxr-xr-x | version-metadata.sh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/version-metadata.sh b/version-metadata.sh index cb9499fec4..1874d1de53 100755 --- a/version-metadata.sh +++ b/version-metadata.sh @@ -34,7 +34,7 @@ for argument in "$@"; do DESKTOP="true" ;; -*) - echo "Unknown option \"$argument\"" + echo >&2 "Unknown option \"$argument\"" exit 1 ;; *) @@ -49,8 +49,8 @@ function inject_version { local VERSION_REGEX="^20([0-9]{2})\.([1-9][0-9]?)(-beta([1-9][0-9]?))?(-dev-[0-9a-f]+)?$" if [[ ! $PRODUCT_VERSION =~ $VERSION_REGEX ]]; then - echo "Invalid version format. Please specify version as:" - echo "<YEAR>.<NUMBER>[-beta<NUMBER>]" + echo >&2 "Invalid version format. Please specify version as:" + echo >&2 "<YEAR>.<NUMBER>[-beta<NUMBER>]" return 1 fi @@ -152,14 +152,8 @@ function delete_backup { set -e } - case "$COMMAND" in "inject") - if [ -z "$PRODUCT_VERSION" ]; then - echo "Please give the release version as an argument to this script." - echo "For example: '2018.1-beta3' for a beta release, or '2018.6' for a stable one." - exit 1 - fi inject_version ;; "restore-backup") @@ -169,7 +163,7 @@ case "$COMMAND" in delete_backup ;; *) - echo "Invalid command" + echo >&2 "Invalid command" exit 1 ;; esac |
