grafana-pcp/create_dependency_bundle.sh
2019-08-30 11:56:40 +02:00

20 lines
424 B
Bash
Executable File

#!/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