diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/makeself/build-runfile.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh index 504a64a3f..dda90d9e5 100755 --- a/scripts/makeself/build-runfile.sh +++ b/scripts/makeself/build-runfile.sh @@ -1,5 +1,17 @@ #!/usr/bin/env bash +# compress algorithm: gzip, bzip2, xz +algo=$1 +if [ -z $algo ]; then + algo="gzip" +fi +suffix=$algo +if [ $algo = "gzip" ]; then + suffix="gz" +elif [ $algo = "bzip2" ]; then + suffix="bz2" +fi + # path constants cd "$(dirname "$0")/../.." xmakeroot=`pwd` @@ -44,11 +56,11 @@ cd $temproot wget https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run -O ./makeself-2.4.0.run sh ./makeself-2.4.0.run ./makeself-2.4.0/makeself.sh \ - --bzip2 \ + --$algo \ --sha256 \ --lsm ./lsm \ --help-header ./header \ ./xmake \ - $buildroot/xmake.bz2.run \ + $buildroot/xmake.$suffix.run \ xmake-v$version-runfile \ ./scripts/get.sh __local__ |
