[][Refactor prepare.sh]
[Description]
Refactor prepare.sh
1. read branch version from feeds.conf.default_ori if exist(do autobuild script)
2. read branch version from feeds.conf.default if (1) not exist(do prepare.sh only)
[Release-log]
N/A
Change-Id: I8b24e6bc19b13d6866fff3c1d978369ffd7dbbd1
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/5228909
diff --git a/prepare_sdk.sh b/prepare_sdk.sh
index c3e7b87..16c2ae1 100755
--- a/prepare_sdk.sh
+++ b/prepare_sdk.sh
@@ -2,7 +2,11 @@
MTK_FEEDS_DIR=${1}
-OPENWRT_VER=`cat ./feeds.conf.default | grep "src-git packages" | awk -F ";openwrt" '{print $2}'`
+if [ -f feeds.conf.default_ori ]; then
+ OPENWRT_VER=`cat ./feeds.conf.default_ori | grep "src-git packages" | awk -F ";openwrt" '{print $2}'`
+else
+ OPENWRT_VER=`cat ./feeds.conf.default | grep "src-git packages" | awk -F ";openwrt" '{print $2}'`
+fi
if [ -z ${1} ]; then
MTK_FEEDS_DIR=feeds/mtk_openwrt_feed