2017-01-23 13:45:14 +04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Get the parent directory of where this script is.
|
|
|
|
SOURCE="${BASH_SOURCE[0]}"
|
|
|
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
|
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
|
|
|
|
|
|
|
# Change into that dir because we expect that.
|
|
|
|
cd "$DIR"
|
|
|
|
|
2018-01-03 14:58:23 -05:00
|
|
|
# Make sure build tools are available, get VENDORED dependencies and build
|
|
|
|
make get_tools get_vendor_deps build_cc
|
2017-01-23 13:45:14 +04:00
|
|
|
|
|
|
|
# Zip all the files.
|
|
|
|
echo "==> Packaging..."
|
2017-01-31 11:30:54 +04:00
|
|
|
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
|
2017-01-23 13:45:14 +04:00
|
|
|
OSARCH=$(basename "${PLATFORM}")
|
|
|
|
echo "--> ${OSARCH}"
|
|
|
|
|
|
|
|
pushd "$PLATFORM" >/dev/null 2>&1
|
|
|
|
zip "../${OSARCH}.zip" ./*
|
|
|
|
popd >/dev/null 2>&1
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|