Closed TheGreatMcPain closed 3 years ago
Apparently passing arguments to a script while also sourcing doesn't work in a POSIX shell like dash. For example:
this doesn't work.
dash -c ". build/version.sh ."
To get it to work I had to use set -- to modify the current script arguments before sourcing version.sh. Like this:
set --
version.sh
dash -c "set -- '.'; . build/version.sh"
I also make sure to save the old ./configure arguments before running set -- "$srcdir" and then restoring them after sourcing version.sh
./configure
set -- "$srcdir"
Issue fixed with alternative approach in c2f64bb7bb1198273779dcd501c66fe16c5e342c. Thanks for the PR.
Apparently passing arguments to a script while also sourcing doesn't work in a POSIX shell like dash. For example:
this doesn't work.
To get it to work I had to use
set --
to modify the current script arguments before sourcingversion.sh
. Like this:I also make sure to save the old
./configure
arguments before runningset -- "$srcdir"
and then restoring them after sourcingversion.sh