From 03a28f543bef35841eb670801762e0ece76579f8 Mon Sep 17 00:00:00 2001 From: mischa Date: Fri, 15 Jul 2022 16:24:39 +0200 Subject: [PATCH] find .txt.free and rename --- launch.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/launch.sh b/launch.sh index 9361f1c..54215b4 100755 --- a/launch.sh +++ b/launch.sh @@ -26,8 +26,13 @@ if [[ -z ${1} ]]; then exit 1 fi if [[ ! -f "${VMS}/${1}.txt" ]]; then - echo "unable to find ${VMS}/${1}" - exit 1 + echo "unable to find ${VMS}/${1}.txt" + if [[ -f "${VMS}/${1}.txt.free" ]]; then + echo "found ${VMS}/${1}.txt.free" + mv ${VMS}/${1}.txt.free ${VMS}/${1}.txt + else + exit 1 + fi else chown mischa ${VMS}/${1}.txt chmod 600 ${VMS}/${1}.txt