You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-accessibility/brltty/files/brltty-4.2-fix-svnversion.p...

28 lines
918 B

Index: revision
===================================================================
--- revision (revision 5475)
+++ revision (working copy)
@@ -18,15 +18,17 @@
###############################################################################
. "`dirname "${0}"`/prologue.sh"
+set -e
-[ "${#}" -eq 0 ] && syntaxError "missing source root."
+[ "${#}" -gt 0 ] || syntaxError "missing source root"
sourceRoot="${1}"
shift
-[ "${#}" -eq 0 ] || syntaxError "too many parameters."
+[ "${#}" -eq 0 ] || syntaxError "too many parameters"
-set -e
-revision="`svnversion -n "${sourceRoot}"`"
+revision="`svnversion -n "${sourceRoot}" 2>/dev/null`" || semanticError "build revision cannot be determined - subversion not installed"
[ "${revision}" != "exported" ] || revision=""
-[ -z "${revision}" ] || echo "${revision}"
+[ -n "${revision}" ] || semanticError "build revision not known"
+
+echo "${revision}"
exit 0