Skip to content

Commit 260e70f

Browse files
committed
Merge branch 'master' of github.com:megastep/makeself
2 parents d6c1074 + f47b485 commit 260e70f

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

makeself-header.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ filesizes="$filesizes"
2222
keep="$KEEP"
2323
nooverwrite="$NOOVERWRITE"
2424
quiet="n"
25+
nodiskspace="n"
2526
2627
print_cmd_arg=""
2728
if type printf > /dev/null; then
@@ -143,6 +144,7 @@ MS_Help()
143144
--noprogress Do not show the progress during the decompression
144145
--nox11 Do not spawn an xterm
145146
--nochown Do not give the extracted files to the current user
147+
--nodiskspace Do not check for available disk space
146148
--target dir Extract directly to a target directory
147149
directory path can be either absolute or relative
148150
--tar arg1 [arg2 ...] Access the contents of the archive through the tar command
@@ -340,6 +342,10 @@ EOLSM
340342
ownership=n
341343
shift
342344
;;
345+
--nodiskspace)
346+
nodiskspace=y
347+
shift
348+
;;
343349
--xwin)
344350
if test "$NOWAIT" = n; then
345351
finish="echo Press Return to close this window...; read junk"
@@ -468,15 +474,18 @@ if test x"\$keep" = xn; then
468474
trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; /bin/rm -rf \$tmpdir; eval \$finish; exit 15' 1 2 3 15
469475
fi
470476
471-
leftspace=\`MS_diskspace \$tmpdir\`
472-
if test -n "\$leftspace"; then
473-
if test "\$leftspace" -lt $USIZE; then
474-
echo
475-
echo "Not enough space left in "\`dirname \$tmpdir\`" (\$leftspace KB) to decompress \$0 ($USIZE KB)" >&2
476-
if test x"\$keep" = xn; then
477-
echo "Consider setting TMPDIR to a directory with more free space."
477+
if test x"\$nodiskspace" = xn; then
478+
leftspace=\`MS_diskspace \$tmpdir\`
479+
if test -n "\$leftspace"; then
480+
if test "\$leftspace" -lt $USIZE; then
481+
echo
482+
echo "Not enough space left in "\`dirname \$tmpdir\`" (\$leftspace KB) to decompress \$0 ($USIZE KB)" >&2
483+
echo "Use --nodiskspace option to skip this check and proceed anyway" >&2
484+
if test x"\$keep" = xn; then
485+
echo "Consider setting TMPDIR to a directory with more free space."
486+
fi
487+
eval \$finish; exit 1
478488
fi
479-
eval \$finish; exit 1
480489
fi
481490
fi
482491

0 commit comments

Comments
 (0)