From a9dfbec91da4345aeb91a8c01d4b22103684e88d Mon Sep 17 00:00:00 2001 From: Guocheng Zheng <121431418@qq.com> Date: Tue, 14 Apr 2020 19:55:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=9B=B4=E5=A4=9A=E7=A6=BB?= =?UTF-8?q?=E7=BA=BF=E5=8D=87=E7=BA=A7=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/autoupdate-usb.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/autoupdate-usb.sh diff --git a/scripts/autoupdate-usb.sh b/scripts/autoupdate-usb.sh old mode 100644 new mode 100755 index b112008..bb2e0ae --- a/scripts/autoupdate-usb.sh +++ b/scripts/autoupdate-usb.sh @@ -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