|  | @@ -15,7 +15,7 @@ popd >/dev/null
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function usage {
 | 
	
		
			
				|  |  |  	cat <<ENDOFHELP
 | 
	
		
			
				|  |  | -Usage: $0 [-N|D|E] [-K|C|J] [-o] [-O|-A] [-g] [-p prefix] [-m class] [-M file]
 | 
	
		
			
				|  |  | +Usage: $0 [-N|D|E] [-K|C|J] [-o] [-O|-A] [-g] [-s suffix] [-m class] [-M file]
 | 
	
		
			
				|  |  |            [-i] [-I file] [file1 [file2 ...]] [Program]
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |     Will compile Jtalk files - either separately or into a runnable complete
 | 
	
	
		
			
				|  | @@ -64,9 +64,9 @@ Usage: $0 [-N|D|E] [-K|C|J] [-o] [-O|-A] [-g] [-p prefix] [-m class] [-M file]
 | 
	
		
			
				|  |  |    -g
 | 
	
		
			
				|  |  |       Compile Jtalk code in debug mode - include source and references etc.
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  -p prefix
 | 
	
		
			
				|  |  | -     Add <prefix> to compiled js files so that File.st is compiled into
 | 
	
		
			
				|  |  | -     <prefix>File.st.
 | 
	
		
			
				|  |  | +  -s suffix
 | 
	
		
			
				|  |  | +     Add <suffix> to compiled js files so that File.st is compiled into
 | 
	
		
			
				|  |  | +     File.<suffix>.st.
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    -l library1,library2
 | 
	
		
			
				|  |  |       Load listed libraries (no spaces) into Compiler before compiling.
 | 
	
	
		
			
				|  | @@ -134,14 +134,14 @@ BASE=
 | 
	
		
			
				|  |  |  LOAD=
 | 
	
		
			
				|  |  |  LOADANDADD=
 | 
	
		
			
				|  |  |  CLOSUREOPTS=
 | 
	
		
			
				|  |  | -# Ok, bad coding practice but hey, who would use such a prefix?
 | 
	
		
			
				|  |  | -PREFIX=no-silly-prefix
 | 
	
		
			
				|  |  | -PREFIXUSED=
 | 
	
		
			
				|  |  | +# Ok, bad coding practice but hey, who would use such a suffix?
 | 
	
		
			
				|  |  | +SUFFIX=no-silly-suffix
 | 
	
		
			
				|  |  | +SUFFIXUSED=
 | 
	
		
			
				|  |  |  DEBUG=false
 | 
	
		
			
				|  |  |  NODECOMPILE=nodecompile.js
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # Read options and shift them away
 | 
	
		
			
				|  |  | -while getopts "NDEKCJoOAgp:l:L:i:IM:m:h?" o; do
 | 
	
		
			
				|  |  | +while getopts "NDEKCJoOAgs:l:L:i:IM:m:h?" o; do
 | 
	
		
			
				|  |  |  case "$o" in
 | 
	
		
			
				|  |  |     N) ENV=NODE
 | 
	
		
			
				|  |  |        BASE=$KERNEL
 | 
	
	
		
			
				|  | @@ -163,8 +163,8 @@ case "$o" in
 | 
	
		
			
				|  |  |        CLOSUREOPTS="$CLOSUREOPTS --compilation_level ADVANCED_OPTIMIZATIONS"
 | 
	
		
			
				|  |  |        CLOSUREFULL=true;;
 | 
	
		
			
				|  |  |     g) DEBUG=true;;
 | 
	
		
			
				|  |  | -   p) PREFIX=$OPTARG
 | 
	
		
			
				|  |  | -      PREFIXUSED=$PREFIX;;
 | 
	
		
			
				|  |  | +   s) SUFFIX=$OPTARG
 | 
	
		
			
				|  |  | +      SUFFIXUSED=$SUFFIX;;
 | 
	
		
			
				|  |  |     l) LOAD=$OPTARG;;
 | 
	
		
			
				|  |  |     L) LOADANDADD=$OPTARG;;
 | 
	
		
			
				|  |  |     I) INIT=$INITIALIZER;;
 | 
	
	
		
			
				|  | @@ -259,11 +259,11 @@ do
 | 
	
		
			
				|  |  |          CATEGORY=`basename $1 .st`
 | 
	
		
			
				|  |  |          if [ -f "$1" ]; then
 | 
	
		
			
				|  |  |             COMPILE="$COMPILE $1 $CATEGORY"
 | 
	
		
			
				|  |  | -           COMPILED="$COMPILED $PREFIXUSED$CATEGORY.js"
 | 
	
		
			
				|  |  | +           COMPILED="$COMPILED $CATEGORY$SUFFIXUSED.js"
 | 
	
		
			
				|  |  |          else
 | 
	
		
			
				|  |  |             if [ -f $JTALK/st/$1 ]; then
 | 
	
		
			
				|  |  |               COMPILE="$COMPILE $JTALK/st/$1 $CATEGORY"
 | 
	
		
			
				|  |  | -             COMPILED="$COMPILED $PREFIXUSED$CATEGORY.js"
 | 
	
		
			
				|  |  | +             COMPILED="$COMPILED $CATEGORY$SUFFIXUSED.js"
 | 
	
		
			
				|  |  |             else
 | 
	
		
			
				|  |  |               echo "JTalk file not found: $1"
 | 
	
		
			
				|  |  |               exit 1
 | 
	
	
		
			
				|  | @@ -292,7 +292,7 @@ cat $TOOURCOMPILER > $TMPDIR/compiler.js
 | 
	
		
			
				|  |  |   
 | 
	
		
			
				|  |  |  # Compile all collected .st files to .js
 | 
	
		
			
				|  |  |  echo "Loading libraries $TOOURCOMPILER and compiling ..."
 | 
	
		
			
				|  |  | -node $TMPDIR/compiler.js $DEBUG $PREFIX $COMPILE
 | 
	
		
			
				|  |  | +node $TMPDIR/compiler.js $DEBUG $SUFFIX $COMPILE
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  # Verify all .js files corresponding to .st files were created, otherwise exit
 | 
	
		
			
				|  |  |  IFS=" "
 |