#!/usr/bin/env bash
# opensim oar: pack, read, check and unpack OpenSimulator archives of regions (OAR), the files of the caller.

USAGE='opensim oar pack DIR [FILE]
       opensim oar info FILE
       opensim oar check FILE
       opensim oar unpack FILE [DIR]'
HELP="Pack a folder into an OAR (archive.xml, assets, landdata, objects, settings, terrains), tell what an OAR holds, check it, or unpack it into a folder. The folder of a pack defaults to the name of the archive without -src, the folder of an unpack to the name of the archive with -src."

source "$(dirname "$(realpath "${BASH_SOURCE[0]}" 2>/dev/null || echo "${BASH_SOURCE[0]}")")/../src/lib/common"

run oar "$@"
