comparison gsm-fw/buildrel.sh @ 274:e3f17ff16915

gsm-fw: buildrel.sh script for building mokoffs-edit-kit release images
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 07 Feb 2014 08:32:25 +0000
parents
children
comparison
equal deleted inserted replaced
273:d6dfad22cccd 274:e3f17ff16915
1 #!/bin/sh
2 # Shell script for building gsm-fw release binaries
3
4 if [ $# != 1 ]
5 then
6 echo "usage: ./buildrel.sh buildlist" 1>&2
7 exit 1
8 fi
9
10 if [ ! -f "configs/buildlists/$1" ]
11 then
12 echo "Error: no buildlist named $1" 1>&2
13 exit 1
14 fi
15
16 # get to work
17 set -e
18 mkdir -p images
19 exec < "configs/buildlists/$1"
20 while read config imglist
21 do
22
23 if [ -z "$config" -o -z "$imglist" ]
24 then
25 echo "Error: bad line in configs/buildlists/$1" 1>&2
26 exit 1
27 fi
28
29 echo "Building $config configuration"
30 cp configs/$config build.conf
31 make clean
32
33 for img in $imglist
34 do
35 case "$img" in
36 flashImage)
37 format=bin
38 ;;
39 ramImage)
40 format=srec
41 ;;
42 *)
43 echo \
44 "Error: invalid image type $img in configs/buildlists/$1" 1>&2
45 exit 1
46 ;;
47 esac
48
49 echo "Building $img"
50 make $img
51 cp -p finlink/$img.$format images/$config-$img.$format
52 cp -p finlink/$img.elf images/$config-$img.elf
53 done
54
55 done