diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2019-01-29 00:19:17 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2019-01-29 00:19:17 +0300 |
commit | 365687f4ffae7771b2997db2610149e29d77d25d (patch) | |
tree | c870a4308042f463047050295ef31e41863a9b19 /scripts | |
parent | c6c8a70c310f5af7e6cbc427208123ea9f91c17a (diff) |
Get git TAG from script path or fails
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update-translations.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/update-translations.sh b/scripts/update-translations.sh index 17418b253..ba7b67b28 100755 --- a/scripts/update-translations.sh +++ b/scripts/update-translations.sh @@ -1,8 +1,25 @@ #!/bin/bash - +# -------------------------------------------------------------------------- +# Remmina - The GTK+ Remote Desktop Client +# Copyright (C) 2016-2019 Antenore Gatta, Giovanni Panozzo +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# + SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" REMMINATOP="$(dirname "$SCRIPTPATH")" +GIT_TAG="$(git describe --abbrev=0 "${SCRIPTPATH}")" + +if [ -n "${GIT_TAG-unset}" ]; then + echo "GIT_TAG is either empty or not set. Probably you are not in a git repository" + exit 1 +fi + cd "$REMMINATOP" || exit 1 if ! find src plugins -name "*\.c" -o -name "*\.h" | sed 's/^.\///' >| po/POTFILES.in ; then @@ -22,7 +39,7 @@ xgettext --from-code=UTF-8 \ --add-comments \ --files-from=po/POTFILES.in \ --output=po/remmina.temp.pot \ - --package-version="v1.3.1" \ + --package-version="$GIT_TAG" \ --package-name="Remmina" \ --copyright-holder="Antenore Gatta and Giovanni Panozzo" \ --msgid-bugs-address="admin@remmina.org" |