Skip to content

Commit

Permalink
fix postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Jun 27, 2020
1 parent e3e6d72 commit c6a99ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ if [ -e /etc/os-release ]; then
esac
fi
echo "$MINIFIER_BIN detected, downloading minifier binary..."
VERSION=0.1.4
if type wget > /dev/null; then
wget https://github.com/sam0x17/es6-minifier/releases/download/0.1.3/minify-$MINIFIER_BIN -O bin/es6-minifier || exit 1
wget https://github.com/sam0x17/es6-minifier/releases/download/$VERSION/minify-$MINIFIER_BIN -O bin/es6-minifier || exit 1
elif type curl > /dev/null; then
curl -L --url https://github.com/sam0x17/es6-minifier/releases/download/0.1.2/minify-$MINIFIER_BIN --output bin/es6-minifier || exit 1
curl -L --url https://github.com/sam0x17/es6-minifier/releases/download/$VERSION/minify-$MINIFIER_BIN --output bin/es6-minifier || exit 1
else
echo "neither wget nor curl were found, attempting to install wget"
apk add wget || apt-get update && apt-get install wget -y || yum install wget || exit 1
wget https://github.com/sam0x17/es6-minifier/releases/download/0.1.3/minify-$MINIFIER_BIN -O bin/es6-minifier || exit 1
wget https://github.com/sam0x17/es6-minifier/releases/download/$VERSION/minify-$MINIFIER_BIN -O bin/es6-minifier || exit 1
fi
chmod +x bin/es6-minifier

0 comments on commit c6a99ea

Please sign in to comment.