You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functioncorrections_for_bin_images_in_lab_function() {
BIN_NAME=$1
LAB_PATH=$2if [[ $BIN_NAME="i86_Linux-L2-Adventerpisek9-mx.SSA.high_iron_20190423.bin" ]];then
OLD_FILENAME="i86_Linux-L2-Adventerpisek9-mx.SSA.high_iron_20190423.bin"
NEW_FILENAME="i86bi_linux_l2-adventerprisek9-ms.SSA.high_iron_20190423.bin"# Bad spelling: 4 errors# 1) i86 should be i86bi (bi is missing)# 2) Adventerpisek9 should be Adventerprisek9 (r letter is missing)# 3) i86_Linux should be i86bi_linux_l2 (L in Linux should be in lowercase, "bi" missing case and change template)# 4) -mx should be -ms (not mx but ms)
BIN_NAME=$NEW_FILENAMEecho -e "\nImage filename changed from:\n$OLD_FILENAME"echo -e "to\n$NEW_FILENAME\n"echo"Changing the filename image inside .unl lab file"
sed -i -e 's/'$OLD_FILENAME'/'$NEW_FILENAME'/g'"$LAB_PATH"echo -e "Changing: OK\n"fiif [[ $BIN_NAME="L3-ADVENTERPRISEK9-M-15.4-2T.bin" ]];then
OLD_FILENAME="L3-ADVENTERPRISEK9-M-15.4-2T.bin"
NEW_FILENAME="i86bi_linux_l3-L3-ADVENTERPRISEK9-M-15.4-2T.bin"# Bad spelling: 1 error# 1) L3 is not a yml valid template (There is not a L3.yml available)# So, filename must be i86bi_linux_l3 (for i86bi_linux_l3.yml)# BIN_NAME="L3-ADVENTERPRISEK9-M-15.4-2T.bin" # This is the old filename to download it in this case# echo -e "\nImage filename changed from:\n$OLD_FILENAME"# echo -e "to\n$NEW_FILENAME\n"echo"Changing the filename image inside .unl lab file"
sed -i -e 's/'$OLD_FILENAME'/'$NEW_FILENAME'/g'"$LAB_PATH"echo -e "Changing: OK"fi
}