mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Fixed adding EXEEXT at the end of the application name; run the app using
exec; some other minor fixes - a comment, some quotes git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@13243 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
16a16229ca
commit
8e08ef8843
1 changed files with 16 additions and 10 deletions
26
openapp.in
26
openapp.in
|
@ -31,9 +31,6 @@ fi
|
|||
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
||||
GNUSTEP_FLATTENED=@GNUSTEP_FLATTENED@
|
||||
fi
|
||||
if [ -z "$EXEEXT" ]; then
|
||||
EXEEXT=@EXEEXT@
|
||||
fi
|
||||
|
||||
# trap the --library-combo parameter
|
||||
case $1 in
|
||||
|
@ -53,10 +50,6 @@ esac
|
|||
# Remove leading slashes at the end of the application name
|
||||
app=`echo $app | sed 's%/*$%%'`
|
||||
|
||||
if [ -n "$EXEEXT" ]; then
|
||||
app=$app$EXEEXT
|
||||
fi
|
||||
|
||||
case $app in
|
||||
/*) # An absolute path.
|
||||
full_appname=$app;;
|
||||
|
@ -91,11 +84,24 @@ fi
|
|||
appname=`echo $app | sed 's/\.[a-z]*$//'`
|
||||
appname=`basename $appname`
|
||||
|
||||
if [ ! -f $full_appname/$appname ]; then
|
||||
echo "Could not find $full_appname executable/script"
|
||||
if [ -n "$GNUSTEP_FLATTENED" ]; then
|
||||
|
||||
if [ -z "$EXEEXT" ]; then
|
||||
EXEEXT=@EXEEXT@
|
||||
fi
|
||||
|
||||
if [ -n "$EXEEXT" ]; then
|
||||
appname="$appname$EXEEXT"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$full_appname/$appname" ]; then
|
||||
echo "Could not find $full_appname/$appname executable/script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
$full_appname/$appname "$@"
|
||||
exec "$full_appname/$appname" "$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue