1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 21:19:41 +02:00

nanonote-files: reflash_ben.sh using -O in wget

This commit is contained in:
Xiangfu Liu 2011-06-08 08:07:01 +08:00
parent 221303d283
commit 3ecb2ca77e

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# version of me # version of me
__VERSION__="2011-06-01" __VERSION__="2011-06-07"
# 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"
@ -168,21 +168,21 @@ if [ "$PROTOCOL" == "http" ]; then
log "fetching bootloader..." log "fetching bootloader..."
wget \ wget \
-a "${LOG_FILE}" \ -a "${LOG_FILE}" \
-P "${WORKING_DIR}" \ -O "${WORKING_DIR}/${LOADER}" \
"${BASE_URL_HTTP}/${VERSION}/${LOADER}" "${BASE_URL_HTTP}/${VERSION}/${LOADER}"
fi fi
if [ "$K" == "TRUE" ]; then if [ "$K" == "TRUE" ]; then
log "fetching kernel..." log "fetching kernel..."
wget \ wget \
-a "${LOG_FILE}" \ -a "${LOG_FILE}" \
-P "${WORKING_DIR}" \ -O "${WORKING_DIR}/${KERNEL}" \
"${BASE_URL_HTTP}/${VERSION}/${KERNEL}" "${BASE_URL_HTTP}/${VERSION}/${KERNEL}"
fi fi
if [ "$R" == "TRUE" ]; then if [ "$R" == "TRUE" ]; then
log "try fetching .ubi.bz2 rootfs..." log "try fetching .ubi.bz2 rootfs..."
wget \ wget \
-a "${LOG_FILE}" \ -a "${LOG_FILE}" \
-P "${WORKING_DIR}" \ -O "${WORKING_DIR}/${ROOTFS}.bz2" \
"${BASE_URL_HTTP}/${VERSION}/${ROOTFS}.bz2" && \ "${BASE_URL_HTTP}/${VERSION}/${ROOTFS}.bz2" && \
(cd ${WORKING_DIR}; bzip2 -d ${ROOTFS}.bz2) (cd ${WORKING_DIR}; bzip2 -d ${ROOTFS}.bz2)
@ -190,7 +190,7 @@ if [ "$PROTOCOL" == "http" ]; then
log "fetching .ubi rootfs..." log "fetching .ubi rootfs..."
wget \ wget \
-a "${LOG_FILE}" \ -a "${LOG_FILE}" \
-P "${WORKING_DIR}" \ -O "${WORKING_DIR}/${ROOTFS}" \
"${BASE_URL_HTTP}/${VERSION}/${ROOTFS}" "${BASE_URL_HTTP}/${VERSION}/${ROOTFS}"
fi fi
fi fi
@ -236,3 +236,7 @@ if [ "$ALL" == "TRUE" ]; then
fi fi
log "done" log "done"
########## ChangeLog ###############
### 2011-06-07
# using -O in wget