chattyness/stock/load.sh

23 lines
520 B
Bash
Executable file

#!/bin/sh
# Load all stock assets into the server.
#
# Usage: ./stock/load.sh [--force|-f]
#
# Options:
# --force, -f Update existing assets instead of failing with 409 Conflict
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Parse arguments
FORCE_FLAG=""
for arg in "$@"; do
case "$arg" in
--force|-f)
FORCE_FLAG="--force"
;;
esac
done
(cd "$SCRIPT_DIR/avatar" && ./setup.sh $FORCE_FLAG)
(cd "$SCRIPT_DIR/props" && ./upload-stockprops.sh $FORCE_FLAG)