~sourcemage/sorcery

0330ceaa3794a4538ed1417e83d96a6d531d781a — Ismael Luceno 1 year, 3 months ago dbd0c00
sightsee: Print a warning if no release was extracted
1 files changed, 4 insertions(+), 2 deletions(-)

M usr/lib/sorcery/cmd/sightsee
M usr/lib/sorcery/cmd/sightsee => usr/lib/sorcery/cmd/sightsee +4 -2
@@ 80,7 80,7 @@ find "${paths[@]}" -name DETAILS -exec awk '
	}
	function print_spell() {
		if (watch_url == "") {
			printf "E: %s: %s\n", spell, \
			printf "W: %s: %s\n", spell, \
				"Upstream releases page not specified" \
				>"/dev/stderr"
		}


@@ 90,7 90,9 @@ find "${paths[@]}" -name DETAILS -exec awk '
  ' {} + |
while read spell cur_rel url regex; do
  latest_rel=$(upstream_rel_get "$url" "$regex" | sed q) || continue
  if [ "x$latest_rel" != "x$cur_rel" ]; then
  if [ -z "$latest_rel" ]; then
    >&2 echo "W: $spell has no published releases, review the URL"
  elif [ "x$latest_rel" != "x$cur_rel" ]; then
    echo "$spell $latest_rel"
  elif [ -n "$verbose" ]; then
    >&2 echo "I: $spell is up to date"