Skip to content

Commit

Permalink
Merge pull request #16 from ydavit/master
Browse files Browse the repository at this point in the history
Added pbzip2 support, and fixed some issues.
  • Loading branch information
megastep committed Nov 23, 2012
2 parents cbb0c56 + 32828da commit 11216a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
8 changes: 4 additions & 4 deletions makeself-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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\`
Expand Down
3 changes: 3 additions & 0 deletions makeself.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions makeself.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -152,6 +153,10 @@ do
echo Makeself version $MS_VERSION
exit 0
;;
--pbzip2)
COMPRESS=pbzip2
shift
;;
--bzip2)
COMPRESS=bzip2
shift
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 11216a7

Please sign in to comment.