From b415de752e49bbee840b48bcdc5bef7972c2d265 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 26 Nov 2022 15:16:38 +0200 Subject: [OKG/EE] Find path is now a parameter --- Year 2/Computer Graphics Fundamentals/ExerciseJSExtractor.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Year 2/Computer Graphics Fundamentals/ExerciseJSExtractor.sh b/Year 2/Computer Graphics Fundamentals/ExerciseJSExtractor.sh index 46beab1..57d95d3 100755 --- a/Year 2/Computer Graphics Fundamentals/ExerciseJSExtractor.sh +++ b/Year 2/Computer Graphics Fundamentals/ExerciseJSExtractor.sh @@ -1,8 +1,13 @@ #!/bin/bash +if [ -z "$1" ]; then + echo "You need to specify location of exercises!" + exit +fi + createOKGProblemFile() { awk 'BEGIN { injs = 0 } /<\/script>/ { injs = 0 } { if (injs == 1) { gsub(/^\t\t\t/, ""); print } } /