From 546e82e8644e7a408f2f137a4c6b8132c29d4cfc Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Wed, 26 Jun 2024 19:32:08 +0200 Subject: [PATCH] Delete output/downloads folders on exec --- run.bat | 16 ++++++++++++++++ run.sh | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/run.bat b/run.bat index 919a898..d06dd1a 100644 --- a/run.bat +++ b/run.bat @@ -1,6 +1,22 @@ @echo off setlocal enabledelayedexpansion +IF EXIST "output" ( + echo Folder "output" exists. Deleting... + rmdir /s /q "output" + echo Folder "output" has been deleted. +) ELSE ( + echo Folder "output" does not exist. +) + +IF EXIST "downloads" ( + echo Folder "downloads" exists. Deleting... + rmdir /s /q "downloads" + echo Folder "downloads" has been deleted. +) ELSE ( + echo Folder "downloads" does not exist. +) + rem GitHub repository information set repoOwner=RaphiMC set repoName=JavaDowngrader diff --git a/run.sh b/run.sh index a0aeccf..a6812e6 100644 --- a/run.sh +++ b/run.sh @@ -2,6 +2,22 @@ set -e +if [ -d "output" ]; then + echo "Folder 'output' exists. Deleting..." + rm -rf "output" + echo "Folder 'output' has been deleted." +else + echo "Folder 'output' does not exist." +fi + +if [ -d "downloads" ]; then + echo "Folder 'downloads' exists. Deleting..." + rm -rf "downloads" + echo "Folder 'downloads' has been deleted." +else + echo "Folder 'downloads' does not exist." +fi + # GitHub repository information repoOwner="RaphiMC" repoName="JavaDowngrader"