a script to distribute tecs resources M.Z.

This commit is contained in:
cvs
2003-08-27 13:03:20 +00:00
parent e70aa6e6b7
commit d310b4a427

74
tecs/didi Executable file
View File

@ -0,0 +1,74 @@
#!/bin/tcsh
set destlist=( type@osf1 \
AMOR@lnsa14:bin/ DMC@lnsa05:bin/ FOCUS@lnsa16:bin/ \
HRPT@lnsa11:bin/ TASP@lnsa12:bin/ TRICS@lnsa18:bin/ \
lnslib@lnsa15:bin/ \
type@linux \
TOPSI@pc4120:topsi_sics/ SANS@pc3965:sans_sics/ \
)
set dests=""
set destl=""
foreach dest ($destlist)
set ext=${dest:s/@/ /}
set ext=($ext)
if ("$ext[1]" == type) then
set type=$ext[2]
else
set d=$ext[1]
if ($?type) then
set t_$d=$type
else
echo "type undefined"
exit
endif
set d_$d=$dest
set dests=($dests $ext[1])
endif
end
set items=(TecsServer TecsClient six cfg)
echo ""
echo " all $items"
echo -n "distribute what: "
set what=$<
if ($what == all) then
set what=($items)
endif
echo ""
echo " all $dests"
echo "distribute where: "
set where=$<
if ($where == all) then
set where=($dests)
endif
set this=${0:h}
if ($this == $0) then
set this=./
endif
cd $this
set makeit=1
set obj=../../obj/$SICS_VERSION/psi/tecs
foreach dest ($where)
alias get 'set d=$'"d_$dest;"'set t=$'"t_$dest"
get
foreach item ($what)
if ($item == cfg) then
if ($makeit) then
make config
set makeit=0
endif
echo tecs $d
rsync -e ssh -rCtv --delete-excluded $obj/tecs $d
else if ("$t" == "$OSTYPE") then
echo $item $d
rsync -e ssh -vt $obj/$item $d
endif
end
end