Fixed hook outputs

This commit is contained in:
Keith Irwin 2023-03-06 16:50:28 -07:00
parent 2ab2a3ba3b
commit 75ef9c8b6c
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 8 additions and 6 deletions

View File

@ -3,8 +3,13 @@
#
# USAGE: ntfy id qty total
DOMAIN='https://ntfy.blue.slvit.us'
TOPIC='orders-paid_HuXfTbK5kHoLin6OZKeLw1OJ4gcYAA7f0Eh'
URL="${DOMAIN}/${TOPIC}"
curl --silent \
-H "Title: Order for ${3} processed!" \
-H "Tags: moneybag,package" \
-d "Order ${1} needs ${2} items shipped." \
'https://ntfy.blue.slvit.us/orders-paid_HuXfTbK5kHoLin6OZKeLw1OJ4gcYAA7f0Eh'
"${URL}" >/dev/null \
&& printf 'Notified %s about order %s\n' "${URL}" "${1}" \
| || printf 'FAILED to notify %s about order %s\n' "${URL}" "${1}"jq '.message'

View File

@ -3,8 +3,5 @@
#
# USAGE: remove_sid sid shop_dir sold_dir git_dir
printf 'Moving sid %s from %s to %s and commiting to git dir %s\n' "${1}" "${2}" "${3}" "${4}"
find "${2}" -type d -name "${1}" -exec mv {} "${3}/${1}" \; 2>/dev/null
# Update website
npm run build
printf 'Removing sid %s from website\n' "${1}" "${2}" "${3}" "${4}"
find "${2}" -type d -name "${1}" -exec mv {} "${3}/${1}" \; 2>/dev/null && npm run build