nouveau instool pour archi Linux (RH6)

This commit is contained in:
Olivier Sirol 1999-09-24 13:24:58 +00:00
parent 6ad1aed698
commit 83432ab23e
2 changed files with 17 additions and 174 deletions

View File

@ -7,48 +7,18 @@
# Author: Frédéric Pétrot (fred@pasta.fr.ea)
# for version 0
#
# $Id: instool,v 1.3 1999/02/01 14:47:54 alliance Exp $
# $Id: instool,v 1.4 1999/09/24 13:24:57 czo Exp $
#
SYS=`uname -a | awk '{print $1}'`
VER=`uname -a | awk '{print $3}' | awk -F. '{print $1}'`
NOD=`uname -n`
# depends vraiement de l'archi...est n'a ete teste que sur trash...
PATH=/asim/gnu/bin:/usr/ucb:/usr/etc:/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH
if [ ! $NOD = "trash" ] ; then
echo "Please, run this script from trash"
exit 1
fi
#rsh ssh et .profile ...
if [ $SYS = "SunOS" -a $VER = "5" ] ; then
MAIL=/labo/gnu/bin/elm
DF=/usr/ucb/df
DU=/usr/ucb/du
DATE=`/asim/gnu/bin/date +"%Y.%m.%d_%H.%M.%S"`
elif [ $SYS = "SunOS" -a $VER = "4" ] ; then
MAIL=/labo/gnu/bin/elm
DF=/usr/bin/df
DU=/usr/bin/du
DATE=`/asim/gnu/bin/date +"%Y.%m.%d_%H.%M.%S"`
elif [ $SYS = "Linux" ] ; then
MAIL=/usr/bin/elm
DF=/bin/df
DU=/bin/du
DATE=`/asim/gnu/bin/date +"%Y.%m.%d_%H.%M.%S"`
else
echo "`basename $0` is ran on an unknown system"
echo "use it at your own risks, ..."
MAIL=mail
DF=df
DU=du
fi
RSH=rsh
DATE=`/asim/gnu/bin/date +"%Y.%m.%d_%H.%M.%S"`
LOG=$HOME/`basename $0`.$$
BUG=$HOME/`basename $0`_bug.$$
TMP=$HOME/`basename $1`
ALCTEAM="alliance-programmers@asim.lip6.fr"
BUGTEAM="fred ludo czo"
@ -56,7 +26,7 @@ BUGTEAM="fred ludo czo"
# rep par defaut : alliance/archi/$MACHINE
# alliance/share/...
TARGET="SunOS Solaris Linux_elf"
TARGET="SunOS Solaris Linux_elf Linux"
LABO=/users/soft5/newlabo/alliance
CELL_EXTENSIONS="al ap vst vbe cp hns edi spi db dat IDX"
CELLS=$LABO/share/cells
@ -268,15 +238,15 @@ echo " the default shell is now sh"
fi
echo "`basename $0`: Checking for space on disk :"
s=`$DU -s $1/labo/cells $1/labo/etc $1/labo/man \
s=`du -s $1/labo/cells $1/labo/etc $1/labo/man \
2>/dev/null | tail -1 | cut -f 1`
for i in $TARGET; do
for j in $DIR; do
d=`$DU -s $1/labo/$i/$j | tail -1 | cut -f 1`
d=`du -s $1/labo/$i/$j | tail -1 | cut -f 1`
s=`expr $s + $d`
done
done
a=`$DF $LABO | sed -e 's/ */ /g' | tail -1 | cut -f 4`
a=`df $LABO | sed -e 's/ */ /g' | tail -1 | cut -f 4`
if [ $verbose -ne 0 ] ; then
echo "Available disk space $a"
@ -289,136 +259,7 @@ echo " the default shell is now sh"
echo "Ring me again in a few days, ..."
exit 23
fi
#
# echo "+---------------------------------------------------" >> $LOG
# echo $DATE >> $LOG
#
# if [ $verbose -ne 0 ] ; then
# echo "`basename $0` : Copying the directories contents"
# echo "May take a while, ..."
# echo "Cells [$CELL_EXTENSIONS]"
# fi
#
# c=0; nc=0
# if [ -d $1/labo/cells ] ; then
# cd $1/labo/cells
# for d in `\ls -d *`; do
# if [ ! -d $d ]; then continue; fi
# echo > $TMP.ext.$$
# for i in $CELL_EXTENSIONS; do
# ls -1 $1/labo/cells/$d/*.$i 2> /dev/null > $TMP.cell.$$
# if [ -s $TMP.cell.$$ ] ; then
# echo $i >> $TMP.ext.$$
# fi
# done
# if [ ! -s $TMP.ext.$$ ] ; then
# echo "Please remove the $1/labo/cells/$d directory as it"
# echo "contains no cells"
# else
# echo "+---------------------------------------------------" >> $LOG
# mkdir -p $CELLS/$d
# if [ -f $1/labo/cells/$d/CATAL ]; then
# cp $1/labo/cells/$d/CATAL $CELLS/$d
# fi
# echo "Cells:" >> $LOG
# for i in `cat $TMP.ext.$$` ; do
# cp $1/labo/cells/$d/*.$i $CELLS/$d >> $BUG 2>&1
# if [ $? -ne 0 ] ; then
# echo "`basename $0`: cp returned a non-zero exit status"
# echo "that sucks pretty much so I quit leaving things as is"
# exit 17
# fi
# ls -1 $1/labo/cells/$d | grep \.$i | fmt -70 >> $LOG
# done
# fi
# done
# else
# if [ $verbose -ne 0 ] ; then
# echo "none"
# fi
# fi
# cd
#
# if [ $verbose -ne 0 ] ; then
# echo "Etc"
# fi
#
# if [ -d $1/labo/etc ] ; then
# for i in $TARGET; do
# if [ -f $1/labo/etc/$i.mk ] ; then
# echo "`basename $0` cannot install tool $1"
# echo "You're not allowed to install '$i.mk' by yourself boy!"
# exit 9
# fi
# done
#
# if [ -f $1/labo/etc/libraries.mk ] ; then
# echo "`basename $0` cannot install tool $1"
# echo "You're not allowed to install 'libraries.mk' by yourself boy!"
# exit 9
# fi
# ls -1 $1/labo/etc/* > /dev/null 2> $TMP.etc.$$
# if [ ! -s $TMP.etc.$$ ] ; then
# cp $1/labo/etc/* $ETC >> $BUG 2>&1
# if [ $? -ne 0 ] ; then
# echo "`basename $0`: cp returned a non-zero exit status"
# echo "that sucks pretty much so I quit leaving things as is"
# exit 17
# fi
# echo "+---------------------------------------------------" >> $LOG
# echo "Etc :" >> $LOG
# ls -1 $1/labo/etc | fmt -70 >> $LOG
# else
# echo "Please remove the $1/labo/etc directory as it"
# echo "contains no files"
# fi
# else
# if [ $verbose -ne 0 ] ; then
# echo "none"
# fi
# fi
#
# if [ $verbose -ne 0 ] ; then
# echo "Manual pages"
# fi
#
# if [ -d $1/labo/man ] ; then
# echo "+---------------------------------------------------" >> $LOG
# echo "Manuals :" >> $LOG
# for i in 1 2 3 4 5 6 7 8 9 ; do
# if [ -d $1/labo/man/man$i ] ; then
# ls -1 $1/labo/man/man$i/*.$i > /dev/null 2> $TMP.man$i.$$
# if [ -s $TMP.man$i.$$ ] ; then
# echo "Please remove the $1/labo/man/man$i directory as it"
# echo "contains no files"
# else
# cp $1/labo/man/man$i/*.$i $MANS/man$i >> $BUG 2>&1
# if [ $? -ne 0 ] ; then
# echo "`basename $0`: cp returned a non-zero exit status"
# echo "that sucks pretty much so I quit leaving things as is"
# exit 17
# fi
# ls -1 $1/labo/man/man$i | grep \.$i | fmt -70 >> $LOG
# fi
# fi
# done
# for i in 1 2 3 4 5 6 7 8 9 ; do
# if [ -f $TMP.man$i.$$ ] ; then
# cat $TMP.man$i.$$ >> $TMP.man.$$
# fi
# if [ -f $TMP.man.$$ ] ; then
# if [ -s $TMP.man.$$ ] ; then
# echo "Please remove the $1/labo/man directory tree as it"
# echo "contains no files"
# fi
# fi
# done
# else
# if [ $verbose -ne 0 ] ; then
# echo "none"
# fi
# fi
#
if [ $verbose -ne 0 ] ; then
echo "The real stuff right now, ..."
fi
@ -454,7 +295,7 @@ echo " the default shell is now sh"
exit 17
fi
if [ $i = "SunOS" ] ; then
$RSH heavy ranlib $LABO/archi/$i/$j/`basename $k`
rsh heavy ranlib $LABO/archi/$i/$j/`basename $k`
fi
done
else
@ -497,9 +338,8 @@ echo " the default shell is now sh"
done
echo >> $LOG
if [ -s $BUG ] ; then
$MAIL -s "ALC : Problem while installing `basename $1`" $BUGTEAM < $BUG
mail -s "ALC : Problem while installing `basename $1`" $BUGTEAM < $BUG
fi
$MAIL -s "ALC : Install of `basename $1`" `basename $1` < $LOG
echo $* | $MAIL -s "ALC : Install of `basename $1`" $ALCTEAM
echo $* | mail -s "ALC : Install of `basename $1`" $ALCTEAM
cat $LOG >> $HOME/log/`basename $1`.log
exit 0

View File

@ -16,10 +16,13 @@
#
# Author : Olivier SIROL
# Date : April 1997
# $Id: updatelibmk,v 1.3 1999/09/21 15:01:54 czo Exp $
# $Id: updatelibmk,v 1.4 1999/09/24 13:24:58 czo Exp $
# DO_UPDATE: 0 chk only, 1 write file, 2 print stdout
PATH=/asim/gnu/bin:/usr/ucb:/usr/etc:/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH
DO_UPDATE=2
if [ $# -ge 1 ] ; then