carl9170: fix indention and add missing fi
[carl9170fw.git] / autogen.sh
1 #!/bin/bash
2
3 set -e
4
5 case "$1" in
6         config)
7                 echo "Configuring..."
8                 pushd config
9                 cmake .
10                 make
11                 popd
12                 config/conf Kconfig
13                 cmake .
14         ;;
15
16         compile)
17                 echo "Compile time..."
18                 make
19         ;;
20
21         install)
22                 if [ ! -e .config ]; then
23                         exit 1
24                 fi
25
26                 . ./.config
27                 make
28
29                 echo -n "Installing firmware..."
30                 if [ "$CONFIG_CARL9170FW_BUILD_TOOLS" = "y" ]; then
31                         if [ "$CONFIG_CARL9170FW_BUILD_MINIBOOT" = "y" ]; then
32                                 echo -n "Apply miniboot..."
33                                 # also adds checksum
34                                 tools/src/miniboot a carlfw/carl9170.fw minifw/miniboot.fw
35                         else
36                                 echo -n "Add checksum..."
37                                 tools/src/checksum carlfw/carl9170.fw
38                         fi
39                 fi
40
41                 install -m 644 carlfw/carl9170.fw \
42                         ../carl9170-$CONFIG_CARL9170FW_RELEASE_VERSION.fw
43                 echo "done."
44         ;;
45
46         *)
47                 $0 config
48                 $0 compile
49         ;;
50
51
52 esac