소스 검색

linking to latest

Danja Vasiliev 10 년 전
부모
커밋
044901f2dd
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      openwrt/make_fw.sh

+ 10 - 1
openwrt/make_fw.sh

@@ -69,7 +69,16 @@ if [[ $_ERR -eq 0 ]]; then
   ## if build succeeded bump revision
   echo $_MINOR > sg_$_MAJOR.revision
   echo -e "\nSUCCESS\n"
-  ln -sf $_BUILDS/$_VERSION $_BUILDS/current
+
+  ## create symlinks to latest
+  [[ -e $_BUILDS/latest ]] && touch $_BUILDS/latest || mkdir $_BUILDS/latest 
+  for _TARGET in $_TARGETS; do
+    [[ -e $_BUILDS/latest/$_TARGET ]] && rm -f $_BUILDS/latest/$_TARGET/* || mkdir $_BUILDS/latest/$_TARGET
+
+    ln -sf $_BUILDS/$_VERSION/$_TARGET/superglue-firmware-*-factory.bin $_BUILDS/latest/$_TARGET/superglue-firmware-latest-$(echo $_TARGET | tr [:upper:] [:lower:])-factory.bin
+    ln -sf $_BUILDS/$_VERSION/$_TARGET/superglue-firmware-*-sysupgrade.bin $_BUILDS/latest/$_TARGET/superglue-firmware-latest-$(echo $_TARGET | tr [:upper:] [:lower:])-sysupgrade.bin
+  done
+
 else
   echo -e "\nFAILED\n"
 fi