-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lizz <[email protected]>
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |