464b0424da9580782cc7462e409ff2eb286f3d5d
[old-projects.git] / ekit / MakeEkit.csh
1 #! /bin/csh
2 set inputmode=mode$1
3 if $inputmode == modespell goto spellmaker
4 goto basicmaker
5 basicmaker:
6   echo =========================
7   echo Basic version compilation
8   echo =========================
9   set mode=basic
10   echo [] creating core...
11   cp com/hexidec/ekit/EkitCore_Basic.java com/hexidec/ekit/EkitCore.java
12   if $status == 0 goto compilecore
13   goto failure
14 spellmaker:
15   echo ==============================
16   echo Spellcheck version compilation
17   echo ==============================
18   set mode=spell
19   echo [] creating core...
20   cp com/hexidec/ekit/EkitCore_Spell.java com/hexidec/ekit/EkitCore.java
21   if $status == 0 goto compilecore
22   goto failure
23 compilecore:
24   echo [] compiling core...
25   javac com/hexidec/ekit/EkitCore.java
26   if $status == 0 goto compileapp
27   goto failure
28 compileapp:
29   echo [] compiling application...
30   javac com/hexidec/ekit/Ekit.java
31   if $status == 0 goto makejar
32   goto failure
33 makejar:
34   echo [] jarring...
35   if $mode == basic jar cmf com/hexidec/ekit/ekit.manifest ekit.jar com/hexidec/ekit/*.class com/hexidec/ekit/action/*.class com/hexidec/ekit/component/*.class com/hexidec/util/Base64Codec.class com/hexidec/util/Translatrix.class com/hexidec/ekit/icons/*.gif com/hexidec/ekit/*.properties
36   if $mode == spell jar cmf com/hexidec/ekit/ekit.manifest ekit.jar com/hexidec/ekit/*.class com/hexidec/ekit/action/*.class com/hexidec/ekit/component/*.class com/hexidec/util/Base64Codec.class com/hexidec/util/Translatrix.class com/hexidec/ekit/icons/*.gif com/hexidec/ekit/*.properties com/swabunga/spell/engine/*.class com/swabunga/spell/engine/*.properties com/swabunga/spell/engine/dictionary/* com/swabunga/spell/event/*.class com/swabunga/spell/swing/*.class com/swabunga/spell/swing/*.properties
37   if $status == 0 goto modjar
38   goto failure
39 modjar:
40   echo [] modifying jar permissions...
41   chmod 755 ekit.jar
42   if $status == 0 goto cleanup
43   goto failure
44 cleanup:
45   echo [] cleaning up Ekit classes...
46   rm com/hexidec/ekit/*.class
47   rm com/hexidec/ekit/action/*.class
48   rm com/hexidec/ekit/component/*.class
49   rm com/hexidec/util/Base64Codec.class
50   rm com/hexidec/util/Translatrix.class
51   if $mode == spell goto spellpurge
52   goto finish
53 spellpurge:
54   echo [] cleaning up spellcheck classes...
55   rm com/swabunga/spell/engine/*.class
56   rm com/swabunga/spell/event/*.class
57   rm com/swabunga/spell/swing/*.class
58   goto finish
59 failure:
60   echo [*] make failed with an error level of $status
61   goto finish
62 finish:
63   echo [] finished