#!/bin/sh
##############################################
echo "b24b798ceb8412c1ced5d5ba414e75f54ad0f6a87bc80ebb46e966c9248a9ab1  /usr/local/bin/gwconf-files/filters/gwconf-cp.awk" | sha256sum -c - &>/dev/null || exit 1
##############################################

[ "$(id -u)" = 0 ] || return 1

filter="/usr/local/bin/gwconf-files/filters/gwconf-cp.awk"

target="$(readlink -f "${1}" | "${filter}")"; shift

[ -z "$target" ] && exit 1

tar -xOf "${target}" 'GWS/gws.info.txt'   2>/dev/null || \
tar -xOf "${target}" './GWS/gws.info.txt' 2>/dev/null || \
echo "no info available"
