36cbf44bbc
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@4393 504e572c-2e33-0410-9681-be2bf7408885
117 lines
3.0 KiB
Bash
Executable File
117 lines
3.0 KiB
Bash
Executable File
#!/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$
|
|
#
|
|
#(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$
|
|
#Datum der letzten Änderung: $Date$
|
|
#Version der Datei: $Revision$
|
|
#
|
|
#
|
|
|
|
if [ ! -f $HOME/.ViitorMake ]; then
|
|
echo "Please run Scripts/initViitorMake"
|
|
echo "From ViitorMake Root Direktory"
|
|
echo "This will create a File $HOME/.ViitorMake"
|
|
echo "with necessary information for running"
|
|
echo "ViitorMake Scripts"
|
|
exit 10
|
|
fi
|
|
|
|
source $HOME/.ViitorMake
|
|
|
|
WDIR=`pwd`
|
|
source $VMAKEDIR/defsys
|
|
source $VMAKEDIR/functions/functions
|
|
|
|
GenDeps() {
|
|
BasePkgName=`basename $1`
|
|
echo $BasePkgName
|
|
AbsPkgName=`find $DISTTARGET -name "$BasePkgName"`
|
|
PkgPathName=`dirname $AbsPkgName`
|
|
DepsFile=`echo $BasePkgName|sed -e "s/.tbz$/.dep/"`
|
|
if [ -f $PkgPathName/$DepsFile ]; then
|
|
cat $PkgPathName/$DepsFile|awk '{print $2".tbz"}'
|
|
fi
|
|
}
|
|
|
|
FindAllDeps() {
|
|
DepsFound=1
|
|
|
|
if [ -f /tmp/deps$$ ]; then
|
|
rm /tmp/deps$$
|
|
fi
|
|
while [ "$1" ]; do
|
|
GenDeps $1|sort -u >>/tmp/deps$$
|
|
shift
|
|
done
|
|
cat /tmp/deps$$|sort -u >/tmp/deps2.$$
|
|
mv /tmp/deps2.$$ /tmp/deps$$
|
|
while [ "$DepsFound" == "1" ]; do
|
|
DepsFound=0
|
|
for i in `cat /tmp/deps$$`; do
|
|
for j in `GenDeps $i`; do
|
|
if ! grep $j /tmp/deps$$ 2>&1 >/dev/null; then
|
|
DepsFound=1
|
|
echo $j
|
|
fi
|
|
done
|
|
done |sort -u >/tmp/deps2.$$
|
|
cat /tmp/deps2.$$ >>/tmp/deps$$
|
|
rm /tmp/deps2.$$
|
|
cat /tmp/deps$$|sort -u >/tmp/deps2.$$
|
|
mv /tmp/deps2.$$ /tmp/deps$$
|
|
done
|
|
cat /tmp/deps$$
|
|
rm /tmp/deps$$
|
|
}
|
|
|
|
FindAllDeps $* >/tmp/depends$$
|
|
exec 3<$DISTTARGET/../install/All.cfg
|
|
read -r <&3 CDROM PKGNAME
|
|
while [ "$CDROM" ]; do
|
|
GrepName=`echo $PKGNAME|awk -F '[' '{print $1}'`
|
|
CheckName=`basename $GrepName|sed -e "s/\.tbz$//"`
|
|
if grep $CheckName /tmp/depends$$ 2>&1 >/dev/null; then
|
|
echo "$CDROM $PKGNAME"
|
|
fi
|
|
read -r <&3 CDROM PKGNAME
|
|
done >/tmp/tmpinstall.cfg$$
|
|
exec 3>-
|
|
rm /tmp/depends$$
|
|
|
|
CFGFILE=`basename $1|sed -e "s/\.tbz$//"`.cfg
|
|
cp $DISTTARGET/../install/BaseDevel.cfg $CFGFILE
|
|
|
|
exec 3</tmp/tmpinstall.cfg$$
|
|
read -r <&3 CDROM PKGNAME
|
|
while [ "$CDROM" ]; do
|
|
if grep -F $PKGNAME $CFGFILE 2>&1 >/dev/null; then
|
|
echo -n
|
|
else
|
|
echo "$CDROM $PKGNAME" >>$CFGFILE
|
|
fi
|
|
read -r <&3 CDROM PKGNAME
|
|
done
|
|
exec 3>-
|
|
rm /tmp/tmpinstall.cfg$$
|