#! /bin/sh -f # Copyright (c) 1995 Taligent, Inc. All rights reserved. # $Revision: 1.6 $ if [ $# -lt 2 ]; then echo "### Error ### $0: too few arguments" 1>& 2 echo "### Usage: $0 packagename snippetname [snippetname...]" exit 1 fi dbdir=$TaligentRoot/RuntimeEnv/Data/Samples if [ ! -d $dbdir ] ; then mkdir -m 775 $dbdir fi db=$dbdir/snippet.db.cp original=$dbdir/snippet.db.ascii temp=$dbdir/snippet.db.ascii.temp temp2=$dbdir/snippet.db.ascii.temp2 package=$1 shift for i in $*; do echo $i $package >> $temp2 done if [ ! -f $original ] ; then sort -u +1 -2 +0 -1 $temp2 > $temp else cat $original $temp2 | sort -u +1 -2 +0 -1 - > $temp fi rm -f $temp2 rm -f $original mv $temp $original chmod 0444 $original rm -f $db