File: run

package info (click to toggle)
jedit 5.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,252 kB
  • ctags: 11,190
  • sloc: java: 98,480; xml: 94,070; makefile: 52; sh: 42; cpp: 6; python: 6
file content (38 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# Execute misc/clojure/$1.clj to generate misc/clojure/$1.csv.
# $1 defaults to 'keywords'
#

# This needs to be accurate per the current installation.
CLOJURE_JAR=/usr/local/share/clojure/clojure-1.6.0/clojure-1.6.0.jar

# The rest of the definitions should take care of themselves.

# Figure out what the misc/clojure directory is
# based on where this script is located:
SCRIPT_DIR=`dirname $0`
MISC_CLOJURE_DIR=`readlink -f $SCRIPT_DIR`
# Do two hops up to the jEdit working directory:
MISC_DIR=`dirname $MISC_CLOJURE_DIR`
JEDIT_DIR=`dirname $MISC_DIR`

# There really is only one script.
SCRIPT=${1:-keywords}

# Before
ls -l $MISC_CLOJURE_DIR/$SCRIPT.csv

# Bring up the Clojure jar directory and load misc/clojure/$SCRIPT.clj.
# Specify the jEdit working directory to the loading script.
# Put the output into the misc/clojure directory.
java -cp $CLOJURE_JAR clojure.main \
     $MISC_CLOJURE_DIR/$SCRIPT.clj \
     :jedit $JEDIT_DIR \
   > $MISC_CLOJURE_DIR/$SCRIPT.csv

# After
ls -l $MISC_CLOJURE_DIR/$SCRIPT.csv

# column -s, -t < "$MISC_CLOJURE_DIR/$1.csv" | less -#2 -N -S