4db431d9e8
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@5249 504e572c-2e33-0410-9681-be2bf7408885
156 lines
3.5 KiB
Bash
Executable File
156 lines
3.5 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 -i "s%#source ./makeall%source ./makeall%" $HOME/.bash_profile
|
|
export RCBASH=0
|
|
fi
|
|
}
|
|
|
|
BashRcMod() {
|
|
sed -i "s%^source ./makeall%#source ./makeall%" $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
|
|
./GenPkgList $DISTTARGET >$DISTTARGET/.pkglist
|
|
$VMAKEDIR/Scripts/GenBaseCfg >BaseDevel.cfg
|
|
$VMAKEDIR/Scripts/GenBuildList >All.cfg
|
|
chmod 755 *
|
|
cd ../genCD
|
|
BINDIR=`basename $DISTTARGET`
|
|
sed -i "s/BINARY/$BINDIR/g" .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/isolinux boot
|
|
rm -r Viitor_cdboot
|
|
umount /tmp
|
|
umount /dev/pts
|
|
umount /dev/shm
|
|
umount /dev
|
|
umount /proc
|
|
umount /sys
|
|
CleanUp
|
|
exit
|