1#!/bin/bash 2prompt="Pick the target platform:" 3chip_options=("a33" \ 4 "h8" \ 5 "h3" \ 6 "rk3126" \ 7 "rk3128" \ 8 "atm7039-action" \ 9 "aml-s805" \ 10 "aml-s905" \ 11 "aml-t950" \ 12 "xm-hi3518" \ 13 "v66") 14PLATFORM="" 15 16select opt in "${chip_options[@]}" "Quit"; do 17 case "$REPLY" in 18 19 1 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 20 2 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 21 3 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 22 4 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 23 5 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 24 6 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 25 7 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 26 8 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 27 9 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 28 10 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 29 11 ) echo "${chip_options[$REPLY-1]} is option";PLATFORM=${chip_options[$REPLY-1]};break;; 30 31 $(( ${#chip_options[@]}+1 )) ) echo "Goodbye!"; break;; 32 *) echo "Invalid option. Try another one.";continue;; 33 esac 34done 35 36if [ "$PLATFORM" != "" ]; then 37./ver_info.pl include/ssv_version.h 38 39if [ $? -eq 0 ]; then 40 echo "Please check SVN first !!" 41else 42cp Makefile.android Makefile 43sed -i 's,PLATFORMS =,PLATFORMS = '"$PLATFORM"',g' Makefile 44make clean 45make 46echo "Done ko!" 47fi 48else 49echo "Fail!" 50fi 51 52