[Default] /vendor/etc/uwb/UWB-calibration.conf /vendor/etc/uwb/UWB-calibration-unknown.conf /vendor/etc/uwb/UWB-calibration-default.conf [FCC] UWB-calibration-us.conf UWB-calibration-ca.conf [CE] /vendor/etc/uwb/UWB-calibration-de.conf /vendor/etc/uwb/UWB-calibration-fr.conf /vendor/etc/uwb/UWB-calibration-it.conf /vendor/etc/uwb/UWB-calibration-es.conf /vendor/etc/uwb/UWB-calibration-nl.conf /vendor/etc/uwb/UWB-calibration-se.conf /vendor/etc/uwb/UWB-calibration-no.conf /vendor/etc/uwb/UWB-calibration-dk.conf /vendor/etc/uwb/UWB-calibration-au.conf /vendor/etc/uwb/UWB-calibration-uk.conf [JP] /vendor/etc/uwb/UWB-calibration-jp.conf Bug: 254602083 Test: local verified pass Change-Id: Ibf105390aea6cccf8e796b1cc83cb3fc804f346a Signed-off-by: Rex Lin <rexcylin@google.com>
31 lines
1.2 KiB
Bash
Executable file
31 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# This script is used to generate uwb conuntry configuration file,
|
|
# and the PRODUCT_COPY_FILES list in uwb.mk based on uwb_country.conf
|
|
# Bug: 196073172, 233619860
|
|
|
|
count=1
|
|
|
|
mkdir -p $2
|
|
|
|
while read line ; do
|
|
if [[ "$line" =~ ^"*" ]]; then
|
|
header=${line:1}
|
|
elif [[ "$line" =~ ^"\"" ]]; then
|
|
#line=$(echo ${line/,} | tr -d "\"")
|
|
country[count]=$(echo $line | cut -d ':' -f1 | tr -d "\"")
|
|
code[count]=$(echo $line | cut -d ':' -f2 | tr -d "\"" | tr -d " ")
|
|
if [ "$header" = "FCC" ]; then
|
|
cp $1/UWB-calibration-fcc.conf $2/UWB-calibration-${code[$count]}.conf
|
|
elif [ "$header" = "CE" ]; then
|
|
cp $1/UWB-calibration-ce.conf $2/UWB-calibration-${code[$count]}.conf
|
|
elif [ "$header" = "JP" ]; then
|
|
cp $1/UWB-calibration-jp.conf $2/UWB-calibration-${code[$count]}.conf
|
|
elif [ "$header" = "TW" ]; then
|
|
cp $1/UWB-calibration-tw.conf $2/UWB-calibration-${code[$count]}.conf
|
|
elif [ "$header" = "Restricted" ]; then
|
|
cp $1/UWB-calibration-restricted.conf $2/UWB-calibration-${code[$count]}.conf
|
|
fi
|
|
fi
|
|
((count++))
|
|
done < $1/uwb_country.conf
|