#!/bin/csh
# Make a partial package
echo "Enter make_partial"

if ( -f work/.package_done ) then
        echo Done.
        exit
else 
        rm -f work/.PLIST.mktmp
        rm -f partial2
        grep -v '@' pkg-plist >partial1
        foreach i (`cat partial1`)
        \ls -1d /usr/X11R6/$i |grep X11R6|grep -v ':'|sed s/'\/usr\/X11R6\/'//>>partial2
        \ls -1d /usr/local/$i |grep local|grep -v ':'|sed s/'\/usr\/local\/'//>>partial2
        end
        grep '@' pkg-plist >>partial2
        cp pkg-plist partial3
        cp partial2 pkg-plist
        echo 'This package is incomplete, so it may lack some functionality.'>>pkg-message
        echo Creating partial package
        make package
        echo Done
endif

