watch /proc/mdstat
[sysadmin-cookbook] / recepies / etherpuppet / build-arch.sh
1 #!/bin/sh -x
2
3 arch=$1
4 fwl=/virtual/fwl/
5
6 wget -m -nd -nH http://hg.secdev.org/etherpuppet/raw-file/tip/etherpuppet.c || exit
7
8 path="$fwl/cross-compiler-$arch"
9
10 if [ ! -e $path ] ; then
11         cd $fwl || exit
12         wget -m -nd -nH http://impactlinux.com/fwl/downloads/binaries/cross-compiler/host-i686/cross-compiler-$arch.tar.bz2 || exit
13         tar xvfj cross-compiler-$arch.tar.bz2
14         cd -
15 fi
16
17 PATH=$path/bin:$PATH
18 $arch-gcc -static -o etherpuppet-$arch etherpuppet.c
19
20 ls -al etherpuppet-$arch
21 file   etherpuppet-$arch