From 0945b1b87473353c485dce3cc84c11459351b318 Mon Sep 17 00:00:00 2001 From: pkonal23 <126468996+pkonal23@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:16:13 +0530 Subject: [PATCH] Update mySolution.sh --- mySolution.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mySolution.sh b/mySolution.sh index e69de29..921db23 100644 --- a/mySolution.sh +++ b/mySolution.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# practice dir creation +if [ ! -d "secretDir" ]; then + echo "Failed to generate secret. The directory 'secretDir' must exist before." + exit 1 +fi + +# practice dir deletion and file move +if [ -d "maliciousFiles" ]; then + echo "Failed to generate secret. The directory 'maliciousFiles' contains some> + exit 1 +fi + +# practice file creation +if [ ! -f "secretDir/.secret" ]; then + echo "Failed to generate secret. The directory 'secretDir' must contain a fil> + exit 1 +fi +