lilalo
annotate l3scripts @ 40:5e5878bd1b20
Скрипты lm вынесены в отдельный файл l3config
author | devi |
---|---|
date | Tue Nov 22 22:47:47 2005 +0200 (2005-11-22) |
parents | |
children | 6452bfe549d1 |
rev | line source |
---|---|
devi@40 | 1 ###install |
devi@40 | 2 cat $sshkey | $lmssh $ssh_user@$host /bin/sh -c '"mkdir -p ~/.ssh; cat >>~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys"' |
devi@40 | 3 |
devi@40 | 4 ###install-lm |
devi@40 | 5 cat $lminstall | ssh $ssh_user@$host /bin/sh -s $dirs |
devi@40 | 6 scp l3config.pm l3-agent $ssh_user@$host:/usr/local/bin |
devi@40 | 7 |
devi@40 | 8 ###install-pm |
devi@40 | 9 scp PM/* $ssh_user@$host:/tmp |
devi@40 | 10 ssh $ssh_user@$host 'cd /tmp; tar xfz Term-VT102*.gz; cd Term-VT102*[^z]; perl Makefile.PL; make ; make install' |
devi@40 | 11 #ssh $ssh_user@$host 'cd /tmp; tar xfz Text-Iconv*.gz; cd Text-Iconv*[^z]; perl Makefile.PL; make ; make install' |
devi@40 | 12 |
devi@40 | 13 ###copy-lablogs |
devi@40 | 14 for i in $dirs |
devi@40 | 15 do |
devi@40 | 16 mkdir -p $lablogs/${i##*/} |
devi@40 | 17 scp -q $ssh_user@$host:${i}/.lilalo/* $lablogs/${i##*/} |
devi@40 | 18 done |
devi@40 | 19 |
devi@40 | 20 ###setlab |
devi@40 | 21 for i in $dirs |
devi@40 | 22 do |
devi@40 | 23 echo $lab | ssh $ssh_user@$host "cat > "${i}"/.labmaker/lab" |
devi@40 | 24 done |
devi@40 | 25 |
devi@40 | 26 ###makeout |
devi@40 | 27 common=$course-$date |
devi@40 | 28 personal=$course-$date-$email |
devi@40 | 29 mkdir -p $outpath/${common}/{Lablogs,Docs} |
devi@40 | 30 mkdir -p $outpath/${personal}/{Course,Files} |
devi@40 | 31 cd $outpath/${personal} |
devi@40 | 32 ln -s ../${common}/Lablogs . |
devi@40 | 33 ln -s ../${common}/Docs . |
devi@40 | 34 cd ~- |
devi@40 | 35 export UG_PERSONAL=$outpath/${personal}/Course |
devi@40 | 36 export UG_CENTER="$center" |
devi@40 | 37 export UG_COURSE="$course" |
devi@40 | 38 export UG_DATE="$date" |
devi@40 | 39 export UG_STUDENT="$name" |
devi@40 | 40 export UG_COMPANY="$company" |
devi@40 | 41 export UG_MAIL="$email" |
devi@40 | 42 cd $coursepath; make personal; cd ~- |
devi@40 | 43 |
devi@40 | 44 ###POST-makeout |
devi@40 | 45 rm -rf /tmp/$course-$date |
devi@40 | 46 mkdir /tmp/$course-$date |
devi@40 | 47 find $outpath/*$date* -name \*.pdf -exec cp {} /tmp/$course-$date/ \; |
devi@40 | 48 cd /tmp |
devi@40 | 49 zip -r $course-$date.zip $course-$date |
devi@40 | 50 mv $course-$date.zip /var/www/tmp/ |
devi@40 | 51 mutt -s 'Сгенерированы методички' imchubin\@mail.ru <<LETTER |
devi@40 | 52 Сгенерированы методички для курса $course, который начинается $date. |
devi@40 | 53 |
devi@40 | 54 Архив файлов для печати можно получить по адресу: |
devi@40 | 55 http://chub.in/tmp/$course-$date.zip |
devi@40 | 56 Архив будет доступен по этому адресу в течение трех дней. |
devi@40 | 57 |
devi@40 | 58 -- |
devi@40 | 59 WBR,i.m.chubin |
devi@40 | 60 LETTER |
devi@40 | 61 |
devi@40 | 62 ###watch |
devi@40 | 63 cat taillast.pl | ssh $ssh_user@$host perl - /root/.labmaker |