#!/bin/sh # This script is used to deploy the gitea-colors project. set -eu SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) RSYNC="rsync -av --delete" rsync_files() { mkdir -p "$1/custom/local" $RSYNC --exclude-from="$SCRIPT_DIR/rsync-exclude" "$SCRIPT_DIR/custom/local" "$1/custom/" mkdir -p "$1/custom/options" $RSYNC --exclude-from="$SCRIPT_DIR/rsync-exclude" "$SCRIPT_DIR/custom/options" "$1/custom/" mkdir -p "$1/custom/public" $RSYNC --exclude-from="$SCRIPT_DIR/rsync-exclude" "$SCRIPT_DIR/custom/public" "$1/custom/" mkdir -p "$1/custom/templates" $RSYNC --exclude-from="$SCRIPT_DIR/rsync-exclude" "$SCRIPT_DIR/custom/templates" "$1/custom/" } if [ "$#" -ne 1 ]; then echo "Usage: $0 DESTINATION" >&2 exit 1 fi rsync_files "$1"