2022-03-25 22:44:18 +00:00
|
|
|
################################################################################
|
|
|
|
# Copyright 2022 Antonin Portelli
|
|
|
|
#
|
|
|
|
# This file is part of miria-cli.
|
|
|
|
#
|
|
|
|
# miria-cli is free software: you can redistribute it and/or modify it under
|
|
|
|
# the terms of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation, either version 3 of the License, or (at your option) any
|
|
|
|
# later version.
|
|
|
|
#
|
|
|
|
# miria-cli is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
|
|
|
# miria-cli. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -uoe pipefail
|
|
|
|
|
|
|
|
script_dir=$(dirname $(readlink -f $0))
|
|
|
|
source ${script_dir}/functions.sh
|
|
|
|
|
|
|
|
print_usage() {
|
|
|
|
echo "usage: $(basename $0) <command> <arg1=val1> ... <argn=valn>" 1>&2
|
|
|
|
}
|
|
|
|
|
|
|
|
if (( $# < 1 )); then
|
|
|
|
print_usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
cmd="$1"
|
|
|
|
shift
|
2022-03-26 00:10:40 +00:00
|
|
|
miria_api_error_fatal='false'
|
2022-03-25 22:44:18 +00:00
|
|
|
miria_api_cmd "${cmd}" "$@"
|
2022-03-28 00:07:29 +01:00
|
|
|
echo "${miria_last_xml}"
|