Use POSIX options for tail and tr
authorequal-l2 <eng.equall2@gmail.com>
Mon, 8 Feb 2021 00:27:11 +0000 (09:27 +0900)
committerequal-l2 <eng.equall2@gmail.com>
Mon, 8 Feb 2021 00:34:45 +0000 (09:34 +0900)
Long options like `--delete` and `--lines` are GNU extension, which
cause trouble on non-GNU toolchains.

configure.ac

index 478283a..ba7dca7 100644 (file)
@@ -15,7 +15,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 
 AC_PREREQ(2.57)
-AC_INIT([geeqie], m4_translit(m4_esyscmd([if [ $(git tag --list 'v[1-9]*' --points-at HEAD | wc -c) -gt 0 ]; then git tag --list v[1-9]* --points-at HEAD | tail --lines=1 | tr --delete 'v' ; else git tag --list v[1-9]* | tail --lines=1 | tr --delete 'v' && echo "+git" && git log --max-count=1 --date=format:"%Y%m%d" --format="%ad" && echo "-" && git rev-parse --quiet --verify --short HEAD; fi ]), m4_newline), [geeqie@freelists.org], [], [http://www.geeqie.org/])
+AC_INIT([geeqie], m4_translit(m4_esyscmd([if [ $(git tag --list 'v[1-9]*' --points-at HEAD | wc -c) -gt 0 ]; then git tag --list v[1-9]* --points-at HEAD | tail -n 1 | tr -d 'v' ; else git tag --list v[1-9]* | tail -n 1 | tr -d 'v' && echo "+git" && git log --max-count=1 --date=format:"%Y%m%d" --format="%ad" && echo "-" && git rev-parse --quiet --verify --short HEAD; fi ]), m4_newline), [geeqie@freelists.org], [], [http://www.geeqie.org/])
 
 # Add -Werror to the default CFLAGS
 CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"