You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

51 lines
967 B

export CLOUDFLARE_DNS_API_TOKEN=wFpklBgp0Z1A4yDs5zNhlTKne3W2Si8GLwkl10Oz
if [ -n "$JPICTL" ]; then
:
elif JPICTL=$(which jpictl); then
echo 2 >&2
elif [ -d ./cmd/jpictl ]; then
JPICTL="go run ./cmd/jpictl/"
if [ -d "$(go env GOBIN)" ]; then
echo 3a >&2
elif [ -d "$(go env GOPATH)" ]; then
export GOBIN="$(go env GOPATH)/bin"
echo 3b >&2
elif WS=$(x --root); then
export GOBIN="$WS/bin"
unset -v WS
echo 3c >&2
else
echo 3d >&2
fi
elif [ -d "${WS:-}" -a -x "${WS:+$WS/bin/jpictl}" ]; then
JPICTL="$WS/bin/jpictl"
export PATH="$WS/bin:$PATH"
echo "4a" >&2
else
for WS in \
"$(x --root)" \
"$HOME/projects/apptly" \
; do
if [ -x "$WS/bin/jpictl" ]; then
JPICTL="$WS/bin/jpictl"
export PATH="$WS/bin:$PATH"
echo "4b: '$WS'" >&2
break
fi
done
unset -v WS
[ -n "$JPICTL" ] || echo "4c" >&2
fi
if [ -n "$JPICTL" ]; then
echo "JPICTL='$JPICTL'" >&2
export JPICTL
jpictl() {
$JPICTL "$@"
}
else
echo "JPICTL="
fi