Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- added option for invoking pbzip2 as a compression program

        - fixed file position handling in MS_dd_Progress() function.
          Previously it was skipping the first block, if the compressed
          file consists of a block and the tail
        - fixed progress printing in MS_dd_Progress() function.
  • Loading branch information...
commit 32828da8c41c4017e730259a640c3d6d599d61ea 1 parent cbb0c56
@ydavit ydavit authored
Showing with 17 additions and 4 deletions.
  1. +1 −0  README.md
  2. +4 −4 makeself-header.sh
  3. +3 −0  makeself.1
  4. +9 −0 makeself.sh
View
1  README.md
@@ -73,6 +73,7 @@ The syntax of makeself is the following:
* **--version** : Prints the version number on stdout, then exits immediately
* **--gzip** : Use gzip for compression (is the default on platforms on which gzip is commonly available, like Linux)
* **--bzip2** : Use bzip2 instead of gzip for better compression. The bzip2 command must be available in the command path. I recommend that you set the prefix to something like '.bz2.run' for the archive, so that potential users know that they'll need bzip2 to extract it.
+ * **--pbzip2** : Use pbzip2 instead of gzip for better and faster compression on machines having multiple CPUs. The pbzip2 command must be available in the command path. I recommend that you set the prefix to something like '.bz2.run' for the archive, so that potential users know that they'll need bzip2 to extract it.
* **--compress** : Use the UNIX "compress" command to compress the data. This should be the default on all platforms that don't have gzip available.
* **--nocomp** : Do not use any compression for the archive, which will then be an uncompressed TAR.
* **--notemp** : The generated archive will not extract the files to a temporary directory, but in a new directory created in the current directory. This is better to distribute software packages that may extract and compile by themselves (i.e. launch the compilation through the embedded script).
View
8 makeself-header.sh
@@ -89,8 +89,8 @@ MS_dd_Progress()
bytes=\`expr \$length % \$bsize\`
(
dd bs=\$offset count=0 skip=1 2>/dev/null
- pos=\`expr \$pos \+ \$offset\`
- MS_Printf " 0%% " 1>&2
+ pos=\`expr \$pos \+ \$bsize\`
+ MS_Printf " 0%% " 1>&2
if test \$blocks -gt 0; then
while test \$pos -le \$length; do
dd bs=\$bsize count=1 2>/dev/null
@@ -99,9 +99,9 @@ MS_dd_Progress()
if test \$pcent -lt 100; then
MS_Printf "\b\b\b\b\b\b\b" 1>&2
if test \$pcent -lt 10; then
- MS_Printf " \$pcent%% " 1>&2
+ MS_Printf " \$pcent%% " 1>&2
else
- MS_Printf " \$pcent%% " 1>&2
+ MS_Printf " \$pcent%% " 1>&2
fi
fi
pos=\`expr \$pos \+ \$bsize\`
View
3  makeself.1
@@ -27,6 +27,9 @@ Compress using gzip (default if detected).
.B --bzip2
Compress using bzip2.
.TP
+.B --pbzip2
+Compress using pbzip2.
+.TP
.B --compress
Compress using the UNIX 'compress' command.
.TP
View
9 makeself.sh
@@ -94,6 +94,7 @@ MS_Usage()
echo " --quiet | -q : Do not print any messages other than errors."
echo " --gzip : Compress using gzip (default if detected)"
echo " --bzip2 : Compress using bzip2 instead of gzip"
+ echo " --pbzip2 : Compress using pbzip2 instead of gzip"
echo " --xz : Compress using xz instead of gzip"
echo " --compress : Compress using the UNIX 'compress' command"
echo " --base64 : Instead of compressing, encode the data using base64"
@@ -152,6 +153,10 @@ do
echo Makeself version $MS_VERSION
exit 0
;;
+ --pbzip2)
+ COMPRESS=pbzip2
+ shift
+ ;;
--bzip2)
COMPRESS=bzip2
shift
@@ -324,6 +329,10 @@ gzip)
GZIP_CMD="gzip -c9"
GUNZIP_CMD="gzip -cd"
;;
+pbzip2)
+ GZIP_CMD="pbzip2 -c9"
+ GUNZIP_CMD="bzip2 -d"
+ ;;
bzip2)
GZIP_CMD="bzip2 -9"
GUNZIP_CMD="bzip2 -d"
Please sign in to comment.
Something went wrong with that request. Please try again.