Diff for libco/utils/copp2 between version 1.1 and 1.2
| version 1.1, 2003/03/23 11:02:35 |
version 1.2, 2003/03/30 10:27:47 |
|
|
| #!/bin/sh |
#!/bin/sh |
| IOTTA=/usr/bin/iotta |
IOTTA=/usr/bin/iotta |
| |
mods="" |
| |
# We need TEMP as the `eval set --' would nuke the return value of getopt. |
| |
TEMP=`getopt -o f:o: --long file:output: -n 'copp2' -- "$@"` |
| |
|
| |
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi |
| |
|
| |
# Note the quotes around `$TEMP': they are essential! |
| |
eval set -- "$TEMP" |
| |
|
| |
while true ; do |
| |
case "$1" in |
| |
-f|--file) |
| |
files="$files $2" |
| |
echo "file: $2" |
| |
shift 2 |
| |
;; |
| |
-o|--output) |
| |
out="$2" |
| |
echo "out: $2" |
| |
shift 2 |
| |
;; |
| |
--) shift ; break ;; |
| |
*) echo "Internal error!" ; exit 1 ;; |
| |
esac |
| |
done |
| #COPP_MODS=-I |
#COPP_MODS=-I |
| perl $COPP_MODS $IOTTA - <<_EOF |
|
| ctrl=Iotta::Ctrl::Chain |
|
| chain=copp |
chain=copp |
| #chain/copp=read;write |
perl $COPP_MODS $IOTTA --conf " |
| _EOF |
ctrl=Iotta::Ctrl::Chain |
| |
chain=$chain |
| |
chain/copp=feed;initmeta;read;mko;ids;write |
| |
chain/ids= |
| |
mod/feed=Iotta::Feeder::Files |
| |
mod/feed/files=$files |
| |
mod/initmeta=Iotta::Copp::InitMeta |
| |
mod/cmdline=Ioota::Input::CmdLine |
| |
mod/ids=Iotta::Copp::GetIDs |
| |
mod/read=Iotta::Input::File |
| |
mod/write=Iotta::Output::File |
| |
mod/mko=Iotta::Output::MkName |
| |
mod/mko/template=$out |
| |
" |
Platon Group <platon@platon.org> http://platon.org/
|
|