Browse Source

path setup script for flanagan + added .gitignore

Noah 4 years ago
parent
commit
d6c9c3a6e4
2 changed files with 21 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 20 0
      inputOutputFlanagan/path-setup

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+*.class

+ 20 - 0
inputOutputFlanagan/path-setup

@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# setup JAVACLASS path for using the flanagan library
+
+# quit before potential errors
+if [ ! -f "$PWD/lib/flanagan.jar" ];then
+    echo "Error: Please put your 'flanagan.jar' in ./lib/flanagan.jar" 1>&2
+    exit 1
+fi
+if ! command -v "xclip" > /dev/null 2>&1; then
+    echo "Error: $prog is not found" 1>&2
+    exit 1
+fi
+if ! echo "${PWD##*/}" | grep -q "^inputOutputFlanagan"; then
+    echo "Error: Please execute this file in the 'inputOutputFlanagan' directory" 1>&2
+    exit 1
+fi
+
+echo "export CLASSPATH=\":$PWD/libs/flanagan.jar:\"" | xclip -sel clip
+echo "now paste in your system clipboard"