Index: /release-kits/lirk2/bin/lirk2
===================================================================
--- /release-kits/lirk2/bin/lirk2	(revision 18903)
+++ /release-kits/lirk2/bin/lirk2	(revision 18904)
@@ -1,13 +1,5 @@
-rk_name="lirk2"
-rk_fullname="Linux Release Kit for Greenstone2"
-RK_HOME=$LIRK2_HOME
-source $LIRK2_HOME/linux/rk
-
-echo "O---------------------------------------O"
-echo "|                                       |"
-echo "|   LiRK2                               |"
-echo "|   Linux Release Kit for Greenstone2   |"
-echo "|                                       |"
-echo "O---------------------------------------O"
-
-$toexec 2>&1 | tee lirk2.out
+#!/bin/bash
+export rk_name="lirk2"
+export rk_fullname="Linux Release Kit for Greenstone2"
+export RK_HOME=$LIRK2_HOME
+$LIRK2_HOME/linux/rk $*
Index: /release-kits/lirk3/bin/lirk3
===================================================================
--- /release-kits/lirk3/bin/lirk3	(revision 18903)
+++ /release-kits/lirk3/bin/lirk3	(revision 18904)
@@ -1,13 +1,5 @@
-rk_name="lirk3"
-rk_fullname="Linux Release Kit for Greenstone3"
-RK_HOME=$LIRK3_HOME
-source $LIRK3_HOME/linux/rk
-
-echo "O---------------------------------------O"
-echo "|                                       |"
-echo "|   LiRK3                               |"
-echo "|   Linux Release Kit for Greenstone3   |"
-echo "|                                       |"
-echo "O---------------------------------------O"
-
-$toexec 2>&1 | tee lirk3.out
+#!/bin/bash
+export rk_name="lirk3"
+export rk_fullname="Linux Release Kit for Greenstone3"
+export RK_HOME=$LIRK3_HOME
+$LIRK3_HOME/linux/rk $*
Index: /release-kits/mark2/bin/mark2
===================================================================
--- /release-kits/mark2/bin/mark2	(revision 18903)
+++ /release-kits/mark2/bin/mark2	(revision 18904)
@@ -1,14 +1,5 @@
-rk_name="mark2"
-rk_fullname="Mac Release Kit for Greenstone2"
-RK_HOME=$MARK2_HOME
-source $MARK2_HOME/linux/rk
-
-echo "O---------------------------------------O"
-echo "|                                       |"
-echo "|   Mark2                               |"
-echo "|   Mac Release Kit for Greenstone2     |"
-echo "|                                       |"
-echo "O---------------------------------------O"
-
-$toexec 2>&1 | tee mark2.out
-
+#!/bin/bash
+export rk_name="mark2"
+export rk_fullname="Mac Release Kit for Greenstone2"
+export RK_HOME=$MARK2_HOME
+$MARK2_HOME/linux/rk $*
Index: /release-kits/mark3/bin/mark3
===================================================================
--- /release-kits/mark3/bin/mark3	(revision 18903)
+++ /release-kits/mark3/bin/mark3	(revision 18904)
@@ -1,14 +1,5 @@
-rk_name="mark3"
-rk_fullname="Mac Release Kit for Greenstone3"
-RK_HOME=$MARK3_HOME
-source $MARK3_HOME/linux/rk
-
-echo "O---------------------------------------O"
-echo "|                                       |"
-echo "|   Mark3                               |"
-echo "|   Mac Release Kit for Greenstone3     |"
-echo "|                                       |"
-echo "O---------------------------------------O"
-
-$toexec 2>&1 | tee mark3.out
-
+#!/bin/bash
+export rk_name="mark3"
+export rk_fullname="Mac Release Kit for Greenstone3"
+export RK_HOME=$MARK3_HOME
+$MARK3_HOME/linux/rk $*
Index: /release-kits/shared/linux/rk
===================================================================
--- /release-kits/shared/linux/rk	(revision 18903)
+++ /release-kits/shared/linux/rk	(revision 18904)
@@ -1,4 +1,15 @@
+#!/bin/bash
+function show_title() {
+	echo    "O---------------------------------------------O"
+	echo    "|                                             |"
+	echo -n "|   $rk_name ";
+	for a in `seq 0 $(( 40 - ${#rk_name} ))`; do echo -n " "; done; echo "|"
+	echo -n "|   $rk_fullname ";
+	for a in `seq 0 $(( 40 - ${#rk_fullname} ))`; do echo -n " "; done; echo "|"
+	echo    "|                                             |"
+	echo    "O---------------------------------------------O"
+}
+
 #pre checks
-
 if [ "$rk_name" == "" ]; then
 	echo "rk_name not set";
@@ -32,4 +43,7 @@
 	echo "	-cp"
 	echo "		show the classpath being used by $rk_name"
+	echo
+	echo "	-cmd"
+	echo "		show the ant command being used by $rk_name"
 
 }
@@ -77,4 +91,6 @@
 		echo $CLASSPATH
 		exit
+	elif [ "$1" == "-cmd" ]; then
+		show_cmd=true
 	elif [ "$1" == "-sim" ]; then
 		toexec="$toexec $1"
@@ -87,6 +103,17 @@
 done
 
+#execute (or show the command to be executed)
+if [ "$show_cmd" == "true" ]; then
+	echo $toexec
+elif [ "$sim_mode" == "on" ]; then
+	show_title
+	$toexec
+else
+	show_title | tee ${rk_name}.out
+	$toexec 2>&1 | tee -a ${rk_name}.out
+fi
+
 if [ "$RKOLDPWD" != "" ]; then
 	cd $RKOLDPWD
 fi
-	
+
