21 lines
607 B
Bash
21 lines
607 B
Bash
#!/bin/bash
|
|
function parse() {
|
|
WPSET_REL=$(mktemp /tmp/wpset-releases-XXXXX.json)
|
|
curl -s https://tildegit.org/api/v1/repos/BrendanTCC/brendotools-wallman/tags -o $WPSET_REL
|
|
DOWNLOAD_VERSION=$(cat $WPSET_REL | jq .[0].name | sed s/\"//g)
|
|
DOWNLOAD_NOTES=$(cat $WPSET_REL | jq .[0].message | sed s/\"//g | sed 's/\\n/\
|
|
/g')
|
|
rm $WPSET_REL
|
|
}
|
|
# everything below this comment is entirely for debugging parsing.
|
|
# haha im lazy
|
|
function debug() {
|
|
parse
|
|
echo "newest tag found: $DOWNLOAD_VERSION"
|
|
echo "tag message:"
|
|
echo "$DOWNLOAD_NOTES"
|
|
}
|
|
if [ "$1" == "debug" ]; then
|
|
debug
|
|
fi
|