6
scripts/autoupdate-usb.sh
Normal file → Executable file
6
scripts/autoupdate-usb.sh
Normal file → Executable file
@@ -1,13 +1,15 @@
|
||||
#!/bin/sh
|
||||
SHELLDIR=$(cd `dirname $0`; pwd)
|
||||
echo "shell dir $SHELLDIR"
|
||||
|
||||
cd /mnt/mmcblk0p2
|
||||
rm -rf artifact R2S*.zip FriendlyWrt*img*
|
||||
cp $(dirname $(readlink -f $0))/R2S-Minimal-$(date +%Y-%m-%d)-ROM.zip ./
|
||||
cp $SHELLDIR/R2S-Minimal-$(date +%Y-%m-%d)-ROM.zip ./
|
||||
if [ -f /mnt/mmcblk0p2/R2S*.zip ]; then
|
||||
echo -e '\e[92m今天固件已下载,准备解压\e[0m'
|
||||
else
|
||||
echo -e '\e[91m今天的固件还没更新,尝试下载昨天的固件\e[0m'
|
||||
cp $(dirname $(readlink -f $0))/R2S-Minimal-$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)-ROM.zip ./
|
||||
cp $SHELLDIR/R2S-Minimal-$(date -d "@$(( $(busybox date +%s) - 86400))" +%Y-%m-%d)-ROM.zip ./
|
||||
if [ -f /mnt/mmcblk0p2/R2S*.zip ]; then
|
||||
echo -e '\e[92m昨天的固件已下载,准备解压\e[0m'
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user