source: SH_SHM/branches/2011.2/setup/create_button_set.csh @ 376

Revision 16, 1.2 KB checked in by marcus, 14 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

  • Property svn:executable set to *
Line 
1#! /bin/csh
2#
3# file create_button_set.csh
4#      =====================
5#
6# version 1, 15-Nov-2003
7#
8# Creates new button set with empty entries
9# K. Stammler, 15-Nov-2003
10
11set xprog=$SH_ROOT/setup
12
13set maxset=`$xprog/noof_button_sets.csh`
14
15cd $SH_GLOBALS
16
17# check whether last button set is empty
18set lastname=`printf "STATLIST_%02d.STX" $maxset`
19set res=`grep -c '* ---' $lastname`
20if  ($res >= 30)  then
21        echo "Last button set (number $maxset) is empty.  Use this first."
22        exit
23endif
24
25@ maxset = $maxset + 1
26
27set newname=`printf "STATLIST_%02d.STX" $maxset`
28
29echo ""
30echo "creating button set number $maxset ($newname)"
31echo ""
32
33if  (-e $newname)  \rm $newname
34touch $newname
35echo "! file $newname"              >> $newname
36echo "!      ==============="       >> $newname
37echo "!"                            >> $newname
38echo "! created using $0 at `date`" >> $newname
39echo "!"                            >> $newname
40echo ""                             >> $newname
41echo "set1:  0 14 HALF1"            >> $newname
42echo "set2: 15 29 HALF2"            >> $newname
43echo ""                             >> $newname
44set cnt=1
45while  ($cnt <= 30)
46        echo "* ---"                        >> $newname
47        @ cnt = $cnt + 1
48end
Note: See TracBrowser for help on using the repository browser.