2020-03-01 04:56:26 -05:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2020-07-21 07:47:29 -04:00
|
|
|
function install() {
|
|
|
|
ORIGINAL=$1
|
|
|
|
MODIFIED=$2
|
2020-03-01 04:56:26 -05:00
|
|
|
|
2020-07-21 07:47:29 -04:00
|
|
|
# Create a backup of the original file
|
|
|
|
if [[ ! -e $ORIGINAL.backup ]];
|
|
|
|
then
|
|
|
|
cp $ORIGINAL $ORIGINAL.backup
|
|
|
|
fi
|
2020-03-01 04:56:26 -05:00
|
|
|
|
2020-07-21 07:47:29 -04:00
|
|
|
# Overwrite it with the modified firmware image
|
|
|
|
cp $MODIFIED $ORIGINAL
|
|
|
|
}
|
2020-03-01 04:56:26 -05:00
|
|
|
|
2020-07-21 07:47:29 -04:00
|
|
|
HTC7010=$(ls /lib/firmware/ath9k_htc/*7010* | grep -v backup)
|
|
|
|
HTC9271=$(ls /lib/firmware/ath9k_htc/*9271* | grep -v backup)
|
|
|
|
|
|
|
|
for ORIGINAL in $HTC7010
|
|
|
|
do
|
|
|
|
install $ORIGINAL htc_7010.fw
|
|
|
|
done
|
|
|
|
|
|
|
|
for ORIGINAL in $HTC9271
|
|
|
|
do
|
|
|
|
install $ORIGINAL htc_9271.fw
|
|
|
|
done
|