Fixed the sed regular expression used to extract the executable name

to work when the name is between double quotes


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12170 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-01-21 18:04:42 +00:00
parent 43ce452e50
commit 86f4e9591c

View file

@ -130,12 +130,13 @@ if [ -f "$full_appname/Resources/Info-gnustep.plist" ]; then
# zero or more spaces, followed by 'NSExecutable', followed by zero or
# more spaces, followed by '='
# to this line we apply the following commands:
# s/^[ ]*NSExecutable[ ]*=[ ]*"\?\([^ ]*\)"\?[ ]*;/\1/p;
# which replaces 'NSExecutable = "Gorm";' with Gorm, then, because
# s/^[ ]*NSExecutable[ ]*=[ ]*"\?\([^ "]*\)"\?[ ]*;.*/\1/p;
# which replaces 'NSExecutable = "Gorm";' with 'Gorm', then, because
# of the 'p' at the end, prints out the result
# q; which quits sed since we know there must be a single line to replace.
# q; which quits sed since we know there must be only a single line
# to replace.
appname=`sed -n -e '/^[ ]*NSExecutable[ ]*=/ \
{s/^[ ]*NSExecutable[ ]*=[ ]*"\?\([^ ]*\)"\?[ ]*;/\1/p; q;}' \
{s/^[ ]*NSExecutable[ ]*=[ ]*"\?\([^ "]*\)"\?[ ]*;.*/\1/p; q;}' \
"$full_appname/Resources/Info-gnustep.plist"`
fi
if [ -z "$appname" ]; then