From 3c942b71fc5a406af46448c49e919d19b05feb98 Mon Sep 17 00:00:00 2001 From: "@CyberAndi" Date: Thu, 14 Dec 2023 16:56:57 +0100 Subject: [PATCH] insert checkFile --- openWRT_install_test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openWRT_install_test.sh b/openWRT_install_test.sh index 392b291..5c84651 100644 --- a/openWRT_install_test.sh +++ b/openWRT_install_test.sh @@ -59,6 +59,16 @@ echo 'Please wait for at least 10 minutes and then it will reboot ...' echo } +function checkFile () { +if [ -e $1 ] | [ $(ls $1 2>/dev/null) ] + then + true + + else + false +fi +} + ask_parameter() { release=$(cat /etc/openwrt_release | grep "DISTRIB_RELEASE" | cut -f2 -d '=')