diff options
Diffstat (limited to 'tools/copland/scripts/install.sh')
| -rwxr-xr-x | tools/copland/scripts/install.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/copland/scripts/install.sh b/tools/copland/scripts/install.sh new file mode 100755 index 0000000..7fe0e1c --- /dev/null +++ b/tools/copland/scripts/install.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail + +root_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +source "$root_dir/scripts/fossil-env.sh" +config_file="$root_dir/dist/copland-skin.config" + +if [[ $# -ne 1 ]]; then + printf 'Usage: %s REPOSITORY\n' "$0" >&2 + exit 2 +fi + +repository=$1 +if [[ ! -f "$repository" ]]; then + printf 'Repository does not exist: %s\n' "$repository" >&2 + exit 1 +fi +if [[ ! -f "$config_file" ]]; then + printf 'Built skin not found. Run make build first.\n' >&2 + exit 1 +fi + +"$FOSSIL" configuration import "$config_file" -R "$repository" +printf 'Installed Copland into %s\n' "$repository" |
