;; #!/bin/bash
(module extract
*
(import scheme
chicken
)
(define (get-norefs)
(with-input-from-pipe
"grep 'Warning: refer' typescript |tr '`' ' '|tr "'" " "|awk '{print $7}'"
read-lines))
(define (get-parent-file noref)
(with-input-from-pipe
"grep $fn *mod.scm|grep define|cut -d: -f1"
read-lines))
;;
;; LAST_PARENT=foobar
;;
;; for fn in $(grep 'Warning: refer' typescript |tr '`' ' '|tr "'" " "|awk '{print $7}');do
;; PARENT=$(grep $fn *mod.scm|grep define|cut -d: -f1)
;; if [[ $PARENT != $LAST_PARENT ]];then
;; echo
;; echo $PARENT
;; LAST_PARENT=$PARENT
;; fi
;; echo $fn
;; done
;;