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: Ia0e4bbb2b9bed93fb4dba5c0f46a1760ec6e50d7pull/5575/head
parent
b2aff3e817
commit
c8d176ead9
|
@ -3,7 +3,6 @@
|
|||
srcdir=`dirname $0`
|
||||
test -n "$srcdir" || srcdir=.
|
||||
|
||||
olddir=`pwd`
|
||||
cd "$srcdir"
|
||||
|
||||
function failed {
|
||||
|
@ -37,5 +36,3 @@ cat << EOF
|
|||
Result: All went OK, please run $srcdir/configure (with the appropriate parameters) now.
|
||||
|
||||
EOF
|
||||
|
||||
cd "$olddir"
|
||||
|
|
Loading…
Reference in New Issue