1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 22:20:17 +02:00

nanonote: reflash_ben.sh update option -t for download testing version images

This commit is contained in:
Xiangfu Liu 2011-08-19 19:30:24 +08:00
parent d320abc7e2
commit 5538303120

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# version of me # version of me
__VERSION__="2011-07-21" __VERSION__="2011-08-19"
# use 'http' to download and flash images, use 'file' to flash images present in the <WORKING_DIR> # use 'http' to download and flash images, use 'file' to flash images present in the <WORKING_DIR>
PROTOCOL="http" PROTOCOL="http"
@ -25,7 +25,7 @@ K="FALSE"
R="FALSE" R="FALSE"
ALL="TRUE" ALL="TRUE"
while getopts d:v:l:hbkr OPTIONS while getopts d:t:v:l:hbkr OPTIONS
do do
case $OPTIONS in case $OPTIONS in
d) d)
@ -33,8 +33,13 @@ do
VERSION=$OPTARG # override version by first argument VERSION=$OPTARG # override version by first argument
WORKING_DIR=${VERSION} WORKING_DIR=${VERSION}
;; ;;
t)
BASE_URL_HTTP="http://downloads.qi-hardware.com/software/images/NanoNote/Ben/testing"
VERSION=$OPTARG
WORKING_DIR=${VERSION}
;;
v) v)
VERSION=$OPTARG # override version by first argument VERSION=$OPTARG
WORKING_DIR="${HOME}/.qi/nanonote/ben/${VERSION}" WORKING_DIR="${HOME}/.qi/nanonote/ben/${VERSION}"
;; ;;
l) l)
@ -58,9 +63,11 @@ do
echo "\ echo "\
Usage: $0 [-d <dailybuild version>] [-v <version>] [-l <path to local images>] [-b] [-k] [-r] [-h] Usage: $0 [-d <dailybuild version>] [-v <version>] [-l <path to local images>] [-b] [-k] [-r] [-h]
-d <> I will download and flash a dailybuild version of OpenWrt images -d <> I will download and flash a [dailybuild] version of OpenWrt images
-v <> I will download and flash a specific version of OpenWrt images -t <> I will download and flash a [testing] version of OpenWrt images
-v <> I will download and flash a [specific] version of OpenWrt images
-l <> I will flash images present in folder: <arg> -l <> I will flash images present in folder: <arg>
(missing files will be skipped) (missing files will be skipped)
@ -156,7 +163,7 @@ progress_finish () {
} }
log "working dir: ${WORKING_DIR}" log "working dir: ${WORKING_DIR}"
log "chosen method: ${PROTOCOL}" log "chosen method: ${PROTOCOL} ${BASE_URL_HTTP}"
test ${VERSION} && log "chosen version: ${VERSION}" test ${VERSION} && log "chosen version: ${VERSION}"
log "===" log "==="