ViitorMake/BaseBuild/makeall
kueller d0126e908f V961 Tree Umbau
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/ViitorMake@4277 504e572c-2e33-0410-9681-be2bf7408885
2008-05-03 16:58:54 +00:00

168 lines
4.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.tramp-bbs.de:/opt/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.
#
#Beschreibung:
#Basis Build der Distribution
#
#Aufrufparameter:
#keine - wird von makeViitor aufgerufen
#
#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`
umask 022
source $VMAKEDIR/defsys
CleanUp() {
if [ "$RCBASH" == "1" ]; then
sed -e "s%#source ./makeall%source ./makeall%" $HOME/.bash_profile >/tmp/bash_profile$$
mv /tmp/bash_profile$$ $HOME/.bash_profile
export RCBASH=0
fi
}
BashRcMod() {
sed -e "s%^source ./makeall%#source ./makeall%" $HOME/.bash_profile >/tmp/bash_profile$$
mv /tmp/bash_profile$$ $HOME/.bash_profile
export RCBASH=1
}
trap 'CleanUp' 1
trap 'CleanUp' 2
trap 'CleanUp' 3
trap 'CleanUp' 9
trap 'CleanUp' 15
trap 'CleanUp' 19
trap 'CleanUp' 31
cd $WDIR
if [ ! -f /etc/group ]; then
export MKPKG=0
if echo $TARGET|grep -q 64; then
export MK64BIT="true"
fi
source toolchain/prepdynsys
premk
mk
postmk
fi
if [ "$1" == "DEBUG" ]; then
GENPKGOPT="-d"
fi
if [ ! -d /tmp/ViitorMake ]; then
mkdir /tmp/ViitorMake
fi
if [ ! -d /var/install ]; then
mkdir /var/install
fi
echo "Modifiing bash_profile"
BashRcMod
for i in `cat testchain/testchain.dmk|sed -e "/^#/d"|awk '{print $2}'`; do
if [ "$1" == "DEBUG" ]; then
pwd
$VMAKEDIR/genpkg -dm $i
else
$VMAKEDIR/genpkg -m $i
fi
done
for i in `cat Basesys/Basesys.dmk|sed -e "/^#/d"|awk '{print $2}'`; do
if [ "$1" == "DEBUG" ]; then
$VMAKEDIR/genpkg -dm $i
else
$VMAKEDIR/genpkg -m $i
fi
done
cd `dirname $DISTTARGET`
if [ "$CVSASK" ]; then
echo "Zugriff auf $SVNURL wird benötigt."
echo "Bitte Internetverbindung herstellen und beliebige Taste drücken"
read
fi
for i in ViitorInstall genCD; do
svn co $SVNURL/$i
cd $i
find . -name ".svn" -exec rm -r {} \;
cd ..
done
msgfmt ViitorInstall/locale/Viitor_Install.pod.de -o /usr/share/locale/de/LC_MESSAGES/Viitor_Install.mo
mv ViitorInstall install
cd install
BINDIR=`basename $DISTTARGET`
sed -e "s/^BINARY/$BINDIR/" BaseSystem.cfg >/tmp/BaseSystem.cfg
mv /tmp/BaseSystem.cfg BaseSystem.cfg
sed -e "s/^BINARY/$BINDIR/" Mini.cfg >/tmp/Mini.cfg
mv /tmp/Mini.cfg Mini.cfg
sed -e "s/BINARY/$BINDIR/g" MakeLST >/tmp/MakeLST
mv /tmp/MakeLST MakeLST
sed -e "s/BINARY/$BINDIR/g" Make_Config >/tmp/Make_Config
mv /tmp/Make_Config Make_Config
sed -e "s/BINARY/$BINDIR/g" checkinstall >/tmp/checkinstall
mv /tmp/checkinstall checkinstall
chmod 755 *
./gennetcfgs
cd ..
cd genCD
sed -e "s/BINARY/$BINDIR/g" .genCD_Functions >/tmp/.genCD_Functions
mv /tmp/.genCD_Functions .genCD_Functions
chmod 755 *
cd ..
if [ "$CVSASK" ]; then
echo "Zugriff auf $SVNURL wird benötigt."
echo "Bitte Internetverbindung herstellen und beliebige Taste drücken"
read
fi
svn co $SVNURL/Viitor_cdboot
mv Viitor_cdboot/$BOOTDIR boot
rm -r Viitor_cdboot
umount /tmp
umount /dev/pts
umount /dev/shm
umount /dev
umount /proc
umount /sys
CleanUp
exit