Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81281 / brainfsckInterpreter / runMeChooseMode.sh
diff options
context:
space:
mode:
Commit5288b0429fcdac891be3bced8e21787bd452d44a (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-27 22:31:13 +0200
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-27 22:31:13 +0200
Filesb2fa00659b2ba23a5750300967197c39c42299dd /homework/81281/brainfsckInterpreter/runMeChooseMode.sh
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.tar
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.tar.gz
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.zip
Parent94ea551501a130b45a795c372d49a8aede276950 (diff)
Fixed cloning the repo on Windows
1 files changed, 15 insertions, 0 deletions
-rwxr-xr-xhomework/81281/brainfsckInterpreter/runMeChooseMode.sh15
diff --git a/homework/81281/brainfsckInterpreter/runMeChooseMode.sh b/homework/81281/brainfsckInterpreter/runMeChooseMode.sh
new file mode 100755
index 0000000..4162db4
--- /dev/null
+++ b/homework/81281/brainfsckInterpreter/runMeChooseMode.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+echo -ne "Please enter 0 for live interpreter or 1 for interpretation of a file: "
+read mode
+
+base=`pwd`"/interpreterMain.pl"
+
+if [ $mode == 0 ]
+then
+ exec swipl -q -f "$base" ""
+else
+ echo -n "Please enter the name of the file: "
+ read fileName
+ exec swipl -q -f "$base" "$fileName"
+fi