#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# CLI interface to findsym.altlinux.org
#
# Copyright (c) 2019 <vt@altlinux.org>.
#

opt=
arg=
for o; do
    case "$o" in
	--*) opt="$opt/${o#--}" ;;
	*)   arg="$arg/$o" ;;
    esac
done

if [ -z "$arg" ]; then
    echo "findsym-remote is CLI interface for remote findsym service"
    echo "Usage: findsym-remote [--repo...] [--arch...] symbol[:type]"
    exit 1
fi

exec curl -sS --user root:beer "http://findsym.altlinux.org$opt$arg"
