+generating header_tmp directory
[arm-crypto-lib.git] / install_headers.sh
1 #!/bin/bash
2
3 #PREFIX="/usr/local/arm-none-eabi/include/"
4 PREFIX="/usr/arm-elf/include/"
5 TARGET_DIR="crypto/"
6 SRC_FILE="main_headers"
7
8 OWNER="root"
9 GROUP="root"
10 MODE="644"
11
12 if [ ! -d header_tmp ]; then
13   mkdir header_tmp
14 fi
15
16 for i in `cat $SRC_FILE`; do
17   x=`echo $i | sed 's#^.*/##g'`
18   sed -f header_install_modifier.sed "${i}" > "header_tmp/${x}"
19   /usr/bin/install -o $OWNER -g $GROUP -m $MODE -D "header_tmp/${x}" ${PREFIX}${TARGET_DIR}${x};
20 done;
21
22