#!/usr/bin/env bash
# opensim load: load an inventory or region archive through a running simulator.

USAGE='opensim load iar|oar [GRID [SIMULATOR|REGION]] [--merge] [--skip-assets] [--force-terrain] [--force-parcels] [--no-objects] [--displacement "<X,Y,Z>"] [--rotation DEGREES] [--default-user "AVATAR NAME"] ...
       GRID: the nick of a grid or its name'
HELP="Load an inventory (IAR) or region (OAR) archive through a running simulator console."

# The options are the ones of the archives of OpenSimulator (-h the home URL, -v verbose): only a first -h or a --help is the help
arguments=("$@")
[[ "${1:-}" == -h || " $* " == *" --help "* ]] || set --
source "$(dirname "$(realpath "${BASH_SOURCE[0]}" 2>/dev/null || echo "${BASH_SOURCE[0]}")")/../src/lib/common"

run load ${arguments[@]+"${arguments[@]}"}
