GenInstallcfg erzeugt config files dynamisch aus *.in files (Listen mit shortnames der zu installierenden packages)
.function korrigiert - einige packages werden aus dem shortname nicht richtig erkannt git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorInstall@5215 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
6b4878c6b9
commit
0a4e015641
@ -344,7 +344,7 @@ install_cluster() {
|
|||||||
fi
|
fi
|
||||||
while read -r <&3 INSTCD PKGPATH SHNAME; do
|
while read -r <&3 INSTCD PKGPATH SHNAME; do
|
||||||
echo -n "$NUMOFPKG: "
|
echo -n "$NUMOFPKG: "
|
||||||
INSTPKG=`egrep "SN=$SHNAME;.*PP=$PKGPATH\$" $INSTSOURCE/$PKGLIST|awk -F";" '{print $2}'|sed -e "s/PF=//"`
|
INSTPKG=`grep "SN=$SHNAME;.*PP=$PKGPATH\$" $INSTSOURCE/$PKGLIST|awk -F";" '{print $2}'|sed -e "s/PF=//"`
|
||||||
if [ "$INSTCD" == "Boot" ]; then
|
if [ "$INSTCD" == "Boot" ]; then
|
||||||
installpkg ${INSTOPT} -m $INSTALLROOT -doi $INSTSOURCE/$PKGPATH/$INSTPKG
|
installpkg ${INSTOPT} -m $INSTALLROOT -doi $INSTSOURCE/$PKGPATH/$INSTPKG
|
||||||
else
|
else
|
||||||
|
117
GenInstallcfg
Executable file
117
GenInstallcfg
Executable file
@ -0,0 +1,117 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
||||||
|
#dieses Framework wird im CVS Repository
|
||||||
|
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
|
||||||
|
#
|
||||||
|
#Lage dieser Datei im Archiv: $HeadURL: svn://svn.compuextreme.de/Viitor/V962/ViitorMake/Scripts/GenInstallcfg $
|
||||||
|
#
|
||||||
|
#(c) 2003 Harald Kueller, Germany
|
||||||
|
#This program is free software; you can redistribute it and/or
|
||||||
|
#modify ist under the terms of the GNU General Public License
|
||||||
|
#as published by the Free Software Foundation; either version
|
||||||
|
#2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
#This program is distributed in the hope that it will be useful,
|
||||||
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
#You should have received a copy of the GNU General Public License
|
||||||
|
#along with this program; if not write to the Free Software Foundation,
|
||||||
|
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
#Script:
|
||||||
|
#
|
||||||
|
#Letzte Änderung von: $Author: kueller $
|
||||||
|
#Datum der letzten Änderung: $Date: 2010-01-19 12:27:40 +0100 (Di, 19 Jan 2010) $
|
||||||
|
#Version der Datei: $Revision: 5134 $
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
export PKGLIST=.pkglist
|
||||||
|
|
||||||
|
WDIR=`pwd`
|
||||||
|
|
||||||
|
PKGLISTING=$1
|
||||||
|
TMPFILE=`mktemp`
|
||||||
|
TMPFILE2=`mktemp`
|
||||||
|
rm $TMPFILE
|
||||||
|
rm $TMPFILE2
|
||||||
|
NUMDEPSOLD=0
|
||||||
|
NUMDEPSNEW=0
|
||||||
|
|
||||||
|
GenDeps() {
|
||||||
|
PKGNAME=$1
|
||||||
|
echo >&2 "Generating Dependics for $PKGNAME"
|
||||||
|
PKGFILE=`grep "SN=$PKGNAME;" $DISTTARGET/$PKGLIST|\
|
||||||
|
awk -F";" '{print $2}'|sed -e "s/PF=//"`
|
||||||
|
PKGPATH=`grep "PF=$PKGFILE;" $DISTTARGET/$PKGLIST|\
|
||||||
|
awk -F";" '{print $3}'|\
|
||||||
|
sed -e "s/PP=//"`
|
||||||
|
extractvarchive $DISTTARGET/$PKGPATH/$PKGFILE dep >$TMPFILE
|
||||||
|
echo "WARN $PKGNAME" >>$TMPFILE
|
||||||
|
NUMDEPSOLD=`cat $TMPFILE|wc -l`
|
||||||
|
while [ ! $NUMDEPSOLD == $NUMDEPSNEW ]; do
|
||||||
|
NUMDEPSOLD=$NUMDEPSNEW
|
||||||
|
exec 3<$TMPFILE
|
||||||
|
while read <&3 FLAG SHNAME; do
|
||||||
|
grep "SN=$SHNAME;" $DISTTARGET/$PKGLIST|awk -F";" '{print $2}'|sed -e "s/PF=//"
|
||||||
|
done > $TMPFILE2
|
||||||
|
exec 3>&-
|
||||||
|
for i in `cat $TMPFILE2`; do
|
||||||
|
PKGPATH=`grep "PF=$i;" $DISTTARGET/$PKGLIST|\
|
||||||
|
awk -F";" '{print $3}'|\
|
||||||
|
sed -e "s/PP=//"`
|
||||||
|
extractvarchive $DISTTARGET/$PKGPATH/$i dep
|
||||||
|
done >>$TMPFILE
|
||||||
|
rm $TMPFILE2
|
||||||
|
cat $TMPFILE |sort -u >$TMPFILE2
|
||||||
|
mv $TMPFILE2 $TMPFILE
|
||||||
|
NUMDEPSNEW=`cat $TMPFILE|wc -l`
|
||||||
|
done
|
||||||
|
cat $TMPFILE
|
||||||
|
rm $TMPFILE
|
||||||
|
}
|
||||||
|
|
||||||
|
USAGE="Usage: $0 -d <Path to Distribution Packages> -f <Path to cfg in file>"
|
||||||
|
while getopts :d:f: opt_char; do
|
||||||
|
case $opt_char in
|
||||||
|
d)
|
||||||
|
DISTTARGET=$OPTARG
|
||||||
|
;;
|
||||||
|
f)
|
||||||
|
CFGFILE=$OPTARG
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $USAGE
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d $DISTTARGET ]; then
|
||||||
|
echo "$DISTTARGET ist not a directory"
|
||||||
|
echo $USAGE
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $CFGFILE ]; then
|
||||||
|
echo "$CFGFILE does not exist"
|
||||||
|
echo $USAGE
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in `cat $CFGFILE`; do
|
||||||
|
GenDeps $i >>/tmp/DepsList$$
|
||||||
|
done
|
||||||
|
cat /tmp/DepsList$$|sort -u >/tmp/DepsListSort$$
|
||||||
|
rm /tmp/DepsList$$
|
||||||
|
cat $DISTTARGET/../install/BaseDevel.cfg
|
||||||
|
exec 3<$DISTTARGET/../install/All.cfg
|
||||||
|
while read <&3 CDROM PKGPATH MODNAME; do
|
||||||
|
if grep -q $MODNAME /tmp/DepsListSort$$; then
|
||||||
|
if ! grep -q $MODNAME $DISTTARGET/../install/BaseDevel.cfg; then
|
||||||
|
echo "$CDROM $PKGPATH $MODNAME"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm /tmp/DepsListSort$$
|
Loading…
Reference in New Issue
Block a user