# PKGVERSION
# 
#
# Generates pkgver to be included in the DESCRIPTION file
# of new built packages
#
# Jago July 2002, Stefano M. Iacus
#
# needs "sed" to be found at
# ftp://sunsite.cnlab-switch.ch/software/platform/macos/src/mpw_c/
#

# convert Unix to Mac line-endings
Duplicate -y :::VERSION :::VERSION.mac
translate 0x0a 0x0d <:::VERSION.mac >:::VERSION
Duplicate -y :::date-stamp :::date-stamp.mac
translate 0x0a 0x0d <:::date-stamp.mac >:::date-stamp

set maj `sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\1/' < :::VERSION`
set min `sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\2/' < :::VERSION`

echo "Built: R {maj}.{min}; ppc-apple-macos;" `date`  >:pkgver
