Skip to content

Commit

Permalink
Merge pull request #42 from mikedld/allow-spaces-in-script-name-and-a…
Browse files Browse the repository at this point in the history
…rguments

Properly quote and expand script name and arguments to allow spaces.
  • Loading branch information
megastep committed Dec 11, 2014
2 parents e079c40 + 327e03b commit 6c53e4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions makeself-header.sh
Expand Up @@ -294,7 +294,7 @@ EOLSM
if ! shift 2; then MS_Help; exit 1; fi
for s in \$filesizes
do
MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | tar "\$arg1" - \$*
MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | tar "\$arg1" - "\$@"
offset=\`expr \$offset + \$s\`
done
exit 0
Expand Down Expand Up @@ -487,10 +487,10 @@ if test x"\$script" != x; then
MS_Printf "OK to execute: \$script \$scriptargs \$* ? [Y/n] "
read yn
if test x"\$yn" = x -o x"\$yn" = xy -o x"\$yn" = xY; then
eval \$script \$scriptargs \$*; res=\$?;
eval "\"\$script\" \$scriptargs \"\\\$@\""; res=\$?;
fi
else
eval \$script \$scriptargs \$*; res=\$?
eval "\"\$script\" \$scriptargs \"\\\$@\""; res=\$?
fi
if test "\$res" -ne 0; then
test x"\$verbose" = xy && echo "The program '\$script' returned an error code (\$res)" >&2
Expand Down

0 comments on commit 6c53e4e

Please sign in to comment.