From c8de92573e951ab6a9b7d8165bb15eef6dc4024e Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 30 Dec 2021 17:55:16 +0800 Subject: [PATCH] Update build.sh --- build.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 6c87a625..8ee314a2 100755 --- a/build.sh +++ b/build.sh @@ -186,6 +186,24 @@ fi #src/gz openwrt_routing http://downloads.openwrt.org/releases/18.06.0/packages/${OMR_REAL_TARGET}/routing #src/gz openwrt_telephony http://downloads.openwrt.org/releases/18.06.0/packages/${OMR_REAL_TARGET}/telephony #EOF + +if [ -f "$OMR_TARGET_CONFIG" ]; then + cat "$OMR_TARGET_CONFIG" config -> "$OMR_TARGET/source/.config" <<-EOF + CONFIG_IMAGEOPT=y + CONFIG_VERSIONOPT=y + CONFIG_VERSION_DIST="$OMR_DIST" + CONFIG_VERSION_REPO="$OMR_REPO" + CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)" + EOF +else + cat config -> "$OMR_TARGET/source/.config" <<-EOF + CONFIG_IMAGEOPT=y + CONFIG_VERSIONOPT=y + CONFIG_VERSION_DIST="$OMR_DIST" + CONFIG_VERSION_REPO="$OMR_REPO" + CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" + EOF +fi #if [ "$OMR_KERNEL" = "5.14" ]; then # echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> "$OMR_TARGET/source/.config" # echo 'CONFIG_KERNEL_GIT_REF="78828adaef8fe9b69f9a8c4b60f74b01c5a31c7a"' >> "$OMR_TARGET/source/.config" @@ -616,6 +634,7 @@ echo "Done" cd "$OMR_TARGET/source" echo "Update feeds index" cp .config .config.keep +exit scripts/feeds clean scripts/feeds update -a @@ -639,24 +658,6 @@ else scripts/feeds install -a -d y -f -p openmptcprouter fi cp .config.keep .config - -if [ -f "$OMR_TARGET_CONFIG" ]; then - cat "$OMR_TARGET_CONFIG" config -> "$OMR_TARGET/source/.config" <<-EOF - CONFIG_IMAGEOPT=y - CONFIG_VERSIONOPT=y - CONFIG_VERSION_DIST="$OMR_DIST" - CONFIG_VERSION_REPO="$OMR_REPO" - CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)" - EOF -else - cat config -> "$OMR_TARGET/source/.config" <<-EOF - CONFIG_IMAGEOPT=y - CONFIG_VERSIONOPT=y - CONFIG_VERSION_DIST="$OMR_DIST" - CONFIG_VERSION_REPO="$OMR_REPO" - CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" - EOF -fi scripts/feeds install kmod-macremapper echo "Done"