#!/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"

# source must exist
source="$(readlink -f "${1}" | "${filter}" -v s=1)"; shift
# target may not exist
target="$(echo        "${1}" | "${filter}" -v t=1)"; shift

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

cp "${source}" "${target}"
