libreoffice-online/autogen.sh
Tor Lillqvist c8d176ead9 No need to cd back before exiting a shell script that is run as a command
The autogen.sh script is not supposed to be sourced ("source
autogen.sh"), but run as a command ("./autogen.sh"). After all, it has
the executable bit set. Also, the function called "failed" in it does
an "exit" at the end. That would be a rather rude thing to do as soon
as something goes wrong if the script is sourced.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ia0e4bbb2b9bed93fb4dba5c0f46a1760ec6e50d7
2022-12-07 15:06:16 +02:00

38 lines
789 B
Bash
Executable file

#! /usr/bin/env bash
srcdir=`dirname $0`
test -n "$srcdir" || srcdir=.
cd "$srcdir"
function failed {
cat << EOF 1>&2
Result: $1 failed
Please try running the commands from autogen.sh manually, and fix errors.
EOF
exit 1
}
if test `uname -s` = Linux -o `uname -s` = FreeBSD; then
libtoolize || failed "libtool"
elif test `uname -s` = Darwin; then
libtoolize || glibtoolize || failed "Can't find libtoolize or glibtoolize. Use lode or install it yourself."
fi
aclocal || failed "aclocal"
autoheader || failed "autoheader"
automake --add-missing || failed "automake"
autoreconf || failed "autoreconf"
scripts/refresh-git-hooks || failed "refresh-git-hooks"
cat << EOF
Result: All went OK, please run $srcdir/configure (with the appropriate parameters) now.
EOF