#!/bin/sh

dist_path=$1
dist_path=`cd $dist_path ; pwd`

b="v0.7.2, 97.12.21"
case "$b" in
  %*) b="$RSCHEME_VERSION, `date +'%y.%m.%d-%H:%M'`" ;;
esac

# strip off date part and leading "v"
v=`echo "$b" | sed 's/,.*//' | sed 's/^v//'`

cat <<EOF
,(use paths)

(define *dist-path* (string->dir "$dist_path"))
(define *rscheme-build* "$b")
(define *rscheme-version* "$v")
EOF

## ie, mkcfg > src/tmp/buildcfg.scm
