grafana-pcp/create_dependency_bundle.sh

20 lines
424 B
Bash
Raw Normal View History

2019-08-30 09:56:40 +00:00
#!/bin/bash
set -e
VER="${1:?Usage: $0 version destination}"
DEST="${2:?Usage: $0 version destination}"
if [ -f "$DEST" ]; then
echo "File $DEST exists already."
exit 0
fi
pushd $(mktemp -d)
wget https://github.com/performancecopilot/grafana-pcp/archive/v$VER/grafana-pcp-$VER.tar.gz
tar xfz grafana-pcp-$VER.tar.gz
cd grafana-pcp-$VER
yarn install
echo "Compressing..."
XZ_OPT=-9 tar cJf $DEST node_modules
popd