File size: 529 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/usr/bin/env bash
#
# Optionally automates compressing target/ and other directories.
# Only intended for and needed on macOS.
#
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
NEXT_DIR=$(realpath "$SCRIPT_DIR/..")
# Basic timestamp prefix for logging
PS4='+ $(date "+%Y-%m-%d +%H:%M:%S") '
set -x
if ! command -v afsctool &> /dev/null; then
echo "afsctool is required. Install it with 'brew install afsctool'."
exit 1
fi
afsctool -c "$NEXT_DIR/target" "$NEXT_DIR/node_modules"
|