|
#!/bin/bash
|
|
# This scripts changes the header string which is
|
|
# read by the AirOs web interface to determine if
|
|
# the firmware is valid or not.
|
|
|
|
UBNT_TARGETS="nsm5 rocket nsm2 bullet"
|
|
|
|
[ "$1" != "PRE_BUILD" ] && exit 0
|
|
|
|
shift
|
|
TBUILD="$1"
|
|
shift
|
|
TARGET="$1"
|
|
|
|
[ -z "$TARGET" ] || [ -z "$TBUILD" ] || [ ! -d "build/$TBUILD" ] && exit 1
|
|
[[ "$UBNT_TARGETS" =~ "$TARGET" ]] || exit 2
|
|
|
|
FILE="build/$TBUILD/target/linux/ar71xx/image/Makefile"
|
|
sed -i -e s/"XM,ar7240)"/"XM,ar7240.v5.3.6)"/g $FILE
|