generate-work at [c0dd083188]

File examples/generate-work/generate-work artifact 1db3d7157f part of check-in c0dd083188


#! /usr/bin/env tclsh

lappend auto_path ../../build/work
package require nano

if {[llength $argv] == 0} {
	puts stderr "Usage: generate-work <hash>..."

	exit 1
}

foreach arg $argv {
	if {[catch {
		set work [::nano::work::fromWorkData $arg]
	} err]} {
		puts stderr "Error generating work for \"$arg\": $err"
	} else {
		puts "WORK($arg) = $work"
	}
}