Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (4f36610e9dc99c6f2c8a982d7e918f8e1ea5e57e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (4f36610e9dc99c6f2c8a982d7e918f8e1ea5e57e)
  • Date: Sat, 25 Mar 2023 23:33:00 +0000

GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:

usr/lib/sorcery/cmd/sightsee | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)

New commits:
commit 4f36610e9dc99c6f2c8a982d7e918f8e1ea5e57e
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Improve parsing

Make so that the Watch line can come in any order; it was confusing before
because it needed to happen after VERSION was defined.

commit 248845a2ae31599b87a3a736163e0c683d4aa0b7
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sightsee: Add test mode

diff --git a/usr/lib/sorcery/cmd/sightsee b/usr/lib/sorcery/cmd/sightsee
index 69371d9..81e71f8 100755
--- a/usr/lib/sorcery/cmd/sightsee
+++ b/usr/lib/sorcery/cmd/sightsee
@@ -14,6 +14,10 @@ upstream_rel_get() {
# Process options
while
case "$1" in
+ (--test)
+ shift
+ upstream_rel_get "$@"
+ exit
(--codex)
codex="$2"
shift 2
@@ -53,14 +57,9 @@ else
fi

find "${paths[@]}" -name DETAILS -exec awk '
- function check_missing() {
- if (spell != "")
- printf "E: %s: Upstream releases page not specified\n", \
- spell >"/dev/stderr"
- }
- END { check_missing() }
+ END { print_spell() }
FNR==1 {
- check_missing()
+ if (spell != "") print_spell()
spell = FILENAME
sub(/\/DETAILS$/, "", spell)
sub(/.*\//, "", spell)
@@ -68,16 +67,26 @@ find "${paths[@]}" -name DETAILS -exec awk '
/^ *VERSION=/ {
version = $0
sub(/.*=/, "", version)
+ if (watch_url != "") nextfile
}
/^#Watch:/ {
+ watch_url = $2
+ watch_regex = $3
# TODO check syntax
- print spell, version, $2, $3
- spell = ""
- nextfile
+ if (version != "") nextfile
+ }
+ function print_spell() {
+ if (watch_url == "") {
+ printf "E: %s: %s\n", spell, \
+ "Upstream releases page not specified" \
+ >"/dev/stderr"
+ }
+ print spell, version, watch_url, watch_regex
+ version = watch_url = spell = ""
}
' {} + |
while read spell cur_rel url regex; do
- latest_rel=$(upstream_rel_get "$url" "$regex") &&
+ latest_rel=$(upstream_rel_get "$url" "$regex") || continue
if [ "x$latest_rel" != "x$cur_rel" ]; then
echo "$spell $latest_rel"
elif [ -n "$verbose" ]; then



  • [SM-Commit] GIT changes to master sorcery by Ismael Luceno (4f36610e9dc99c6f2c8a982d7e918f8e1ea5e57e), Ismael Luceno, 03/25/2023

Archive powered by MHonArc 2.6.24.

Top of Page