Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
779 derPENGUIN 1
#!/bin/bash
2
# This script does for linux the same as build.bat for DOS,
3
# it compiles the KoOS kernel, hopefully ;-)
4
 
5
CLANG=$1;
6
 
1516 diamond 7
# set debug=true to print executed bash commands
8
debug=true
9
 
10
outDir=bin
11
outFileName=kernel.mnt
12
outFile=$outDir/$outFileName
13
 
779 derPENGUIN 14
usage()
15
{
1516 diamond 16
   echo "Usage: make.sh [en|ru|ge|et]"
17
   exit 1
779 derPENGUIN 18
}
19
 
20
compile()
21
{
1516 diamond 22
   if [ -d "$outDir" ]; then
23
      $debug && echo "rm -f $outFile"
24
            rm -f $outFile
25
   else
26
      $debug && echo "mkdir $outDir"
27
            mkdir $outDir
28
   fi
29
 
30
   $debug && echo "fasm -m 65536 kernel.asm $outFile"
31
         fasm -m 65536 kernel.asm $outFile
32
 
33
   $debug && echo "rm -f lang.inc"
34
         rm -f lang.inc
35
 
36
   $debug && echo "exit 0"
37
         exit 0
779 derPENGUIN 38
}
39
 
40
if [ ! $CLANG ] ; then
1516 diamond 41
   usage
779 derPENGUIN 42
fi
43
 
44
for i in "en" "ru" "ge" "et"; do
1516 diamond 45
   if [ $i == $CLANG ] ; then
46
      $debug && echo "echo \"lang fix \$i\" > lang.inc"
47
            echo "lang fix $i" > lang.inc
48
      compile
49
   fi
779 derPENGUIN 50
done
51
usage