Skip to content

Commit

Permalink
pigz
Browse files Browse the repository at this point in the history
Signed-off-by: lizz <[email protected]>
  • Loading branch information
innerlee committed Feb 17, 2020
1 parent 61199dc commit 2dd8d7c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions zzpigz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# install pigz
set -e

ROOTDIR=${ZZROOT:-$HOME/app}
NAME="pigz"
TYPE=".tar.gz"
FILE="$NAME$TYPE"
DOWNLOADURL="https://github.com/madler/pigz/archive/v2.4.tar.gz"
echo $NAME will be installed in "$ROOTDIR"

mkdir -p "$ROOTDIR/downloads"
cd "$ROOTDIR"

if [ -f "downloads/$FILE" ]; then
echo "downloads/$FILE exist"
else
echo "$FILE does not exist, downloading from $DOWNLOADURL"
wget $DOWNLOADURL -O $FILE
mv $FILE downloads/
fi

mkdir -p src/$NAME
tar xf downloads/$FILE -C src/$NAME --strip-components 1

cd src/$NAME

make
cp pigz unpigz $ROOTDIR/bin

echo $NAME installed on "$ROOTDIR"

0 comments on commit 2dd8d7c

Please sign in to comment.