@@ -22,6 +22,7 @@ filesizes="$filesizes"
2222keep="$KEEP "
2323nooverwrite="$NOOVERWRITE "
2424quiet="n"
25+ nodiskspace="n"
2526
2627print_cmd_arg=""
2728if 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
469475fi
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
481490fi
482491
0 commit comments