#!/usr/bin/sh cd `dirname $0` basedir=`pwd` mkdir -p packages mkdir -p datastream for pkg in $*; do cd ${basedir}/${pkg} rm -f prototype > /dev/null svn info . > /dev/null if [ $? -eq 0 ]; then revision=`svn info . | grep 'Last Changed Rev:' | awk '{print $NF}'` else revision=1 fi # Create pkginfo file echo "PKG=${pkg} NAME=${pkg} VENDOR=OSQDU ARCH=all EMAIL=software@osqdu.org CATEGORY=application ISTATES=\"S 1 2 3\" RSTATES=\"S 1 2 3\" BASEDIR=\"/\" VERSION=${revision} PSTAMP=\"`hostname``date +%Y%m%d%H%M%S`\" " > pkginfo for pkgfile in pkginfo postinstall postremove depend request preinstall preremove; do if [ -f $pkgfile ]; then echo "i $pkgfile=./$pkgfile" fi done >> prototype pkgproto . | sed '/f none pkginfo/d' | sed '/f none postinstall/d' | \ sed '/f none postremove/d' | \ sed '/f none depend/d' | sed '/f none request/d' | \ sed '/\.svn/d' | sed '/f none prototype/d' | \ sed '/f none preremove/d' | sed '/f none preinstall/d' | \ sed '/f none install.sh/d' >> prototype || exit 1 pkgmk -r . -b . -o -d ../packages/. || exit 1 # Convert to DataStream pkgtrans -s ../packages ../datastream/${pkg} ${pkg} || exit 1 rm prototype pkginfo done exit 0