mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Change backticks to preferred $(...) syntax.
Replace A && B || C syntax with if-then-else. Apparently, this can fail, even if B is "echo ...", if STDOUT is for some reason closed. See https://github.com/koalaman/shellcheck/wiki/SC2015.
This commit is contained in:
parent
e6cb0c56ff
commit
ddf2c2a9d4
16
autogen.sh
16
autogen.sh
@ -6,14 +6,14 @@ AUTOMAKE="automake --add-missing --force-missing --copy --foreign"
|
|||||||
AUTOCONF="autoconf"
|
AUTOCONF="autoconf"
|
||||||
|
|
||||||
# Discover what version of automake we are using.
|
# Discover what version of automake we are using.
|
||||||
automake_version=`$AUTOMAKE --version 2>/dev/null | head -n 1`
|
automake_version=$($AUTOMAKE --version 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
test "$automake_version" != "" && {
|
if "$automake_version" != ""; then
|
||||||
echo "Using $automake_version"
|
echo "Using $automake_version"
|
||||||
} || {
|
else
|
||||||
echo "LyX requires automake >= 1.14"
|
echo "LyX requires automake >= 1.14"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
fi
|
||||||
|
|
||||||
case $automake_version in
|
case $automake_version in
|
||||||
*' '1.1[45]*)
|
*' '1.1[45]*)
|
||||||
@ -26,14 +26,14 @@ case $automake_version in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Discover what version of autoconf we are using.
|
# Discover what version of autoconf we are using.
|
||||||
autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1`
|
autoversion=$($AUTOCONF --version 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
test "$autoversion" != "" && {
|
if "$autoversion" != ""; then
|
||||||
echo "Using $autoversion"
|
echo "Using $autoversion"
|
||||||
} || {
|
else
|
||||||
echo "LyX requires autoconf >= 2.65"
|
echo "LyX requires autoconf >= 2.65"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
fi
|
||||||
|
|
||||||
case $autoversion in
|
case $autoversion in
|
||||||
*' '2.6[5-9])
|
*' '2.6[5-9])
|
||||||
|
Loading…
Reference in New Issue
Block a user