diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2021-12-07 11:46:44 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2021-12-07 12:13:37 +0000 |
commit | 488d8088e7e331076e7b5d0312d491f792d43f3b (patch) | |
tree | 50147fe958d578148706d56b8378d21579c1c527 /expat/conftools/get-version.sh | |
parent | b20b66200381b4e348931b97187ef7b93ab4e655 (diff) | |
download | ghostpdl-488d8088e7e331076e7b5d0312d491f792d43f3b.tar.gz |
Update expat to 2.4.1
Diffstat (limited to 'expat/conftools/get-version.sh')
-rwxr-xr-x | expat/conftools/get-version.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/expat/conftools/get-version.sh b/expat/conftools/get-version.sh index 2592f1032..a70e0fb47 100755 --- a/expat/conftools/get-version.sh +++ b/expat/conftools/get-version.sh @@ -28,8 +28,19 @@ if test ! -r "$hdr"; then exit 1 fi -MAJOR_VERSION=$(sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' "$hdr") -MINOR_VERSION=$(sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' "$hdr") -MICRO_VERSION=$(sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' "$hdr") +MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" +MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" +MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" -printf '%s.%s.%s' "$MAJOR_VERSION" "$MINOR_VERSION" "$MICRO_VERSION" +# Determine how to tell echo not to print the trailing \n. This is +# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't +# generate this file via autoconf (in fact, get-version.sh is used +# to *create* ./configure), so we just do something similar inline. +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac + +echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C" |