Author: Kevin M. Rosenberg
Description: Change csh scripts to bash scripts

--- a/cfg_scripts/mysql/PrintTables
+++ b/cfg_scripts/mysql/PrintTables
@@ -1,11 +1,12 @@
-#!/bin/csh
+#!/bin/bash
 #
 # PrintTables
 #
-if ($1 == "" || $2 == "" ) then
+if [ -z $1 -o -z $2 ];  then
   echo " "
   echo Usage: "$0 <DIM|Control|FIS> <Database Name>"
   echo " "
   exit
-endif
-mysql -uctn -pctn $2 < Print$1Tables.script
+fi
+
+mysql -uctn -pctn $2 < Print${1}Tables.script
--- a/cfg_scripts/mysql/ListTables
+++ b/cfg_scripts/mysql/ListTables
@@ -1,16 +1,16 @@
-#!/bin/csh
+#!/bin/bash
 #
 # ListTables
 #
-if ($1 == "" || $2 == "" ) then
+if [ -z $1 -o -z $2 ]; then
   echo " "
   echo Usage: "$0 <DIM|Control> <Database Name>"
   echo " "
   exit
-endif
+fi
 #
 #
-if( $1 == "Control" )then
+if [ "$1" = "Control" ]; then
 mysqlshow -pctn -uctn $2 ApplicationEntity
 mysqlshow -pctn -uctn $2 GroupNames
 mysqlshow -pctn -uctn $2 StorageAccess
@@ -19,15 +19,15 @@ mysqlshow -pctn -uctn $2 InstanceTable
 mysqlshow -pctn -uctn $2 FISAccess
 mysqlshow -pctn -uctn $2 PrintServerCFG
 mysqlshow -pctn -uctn $2 VideoImageDest
-endif
+fi
 #
 #
 #
-if( $1 == "DIM" )then
+if [ "$1" = "DIM" ]; then
 mysqlshow -pctn -uctn $2 ApplicationEntity
 mysqlshow -pctn -uctn $2 PatientLevel
 mysqlshow -pctn -uctn $2 StudyLevel
 mysqlshow -pctn -uctn $2 SeriesLevel
 mysqlshow -pctn -uctn $2 ImageLevel
 mysqlshow -pctn -uctn $2 InstanceTable
-endif
+fi
--- a/cfg_scripts/mysql/ClearTables
+++ b/cfg_scripts/mysql/ClearTables
@@ -1,11 +1,12 @@
-#!/bin/csh
+#!/bin/bash
 #
 # ClearTables
 #
-if ( $1 == "" || $2 == "" ) then
+if [ -z $1 -o -z $2 ]; then
   echo " "
   echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
   echo " "
   exit
-endif
-mysql $2 < Clear$1Tables.script
+fi
+
+mysql $2 < Clear${1}Tables.script
--- a/cfg_scripts/mysql/FillTables
+++ b/cfg_scripts/mysql/FillTables
@@ -1,15 +1,17 @@
-#!/bin/csh
+#!/bin/bash
 #
 # FillTables
 #
-if ($1 == "" || $2 == "" ) then
+if [ -z $1 -o $2 ]; then
   echo " "
   echo Usage: "$0 <DIM> <Database Name>"
   echo " "
   exit
-endif
-mysql -uctn -pctn $2 < Fill$1Tables.script
-if ($status != 0) then
+fi
+
+mysql -uctn -pctn $2 < Fill${1}Tables.script
+
+if [ $? != 0 ]; then
   echo Could not drop database: $1
   exit 1
-endif
+fi
--- a/cfg_scripts/mysql/CreateTables
+++ b/cfg_scripts/mysql/CreateTables
@@ -1,11 +1,12 @@
-#!/bin/csh
+#!/bin/bash
 #
 # CreateTables
 #
-if ($1 == "" || $2 == "" ) then
+if [ -z $1 -o -z $2 ]; then
   echo " "
   echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
   echo " "
   exit
-endif
-mysql -uctn -pctn $2 < Create$1Tables.script
+fi
+
+mysql -uctn -pctn $2 < Create${1}Tables.script
--- a/cfg_scripts/mysql/DropTables
+++ b/cfg_scripts/mysql/DropTables
@@ -1,15 +1,16 @@
-#!/bin/csh
+#!/bin/bash
 #
 # DropTables
 #
-if ( $1 == "" || $2 == "" ) then
+if [ -z $1 -o -z $2 ]; then
   echo " "
   echo Usage: "$0 <DIM|Control|TBLTest|FIS> <Database Name>"
   echo " "
   exit
-endif
-mysql -uctn -pctn $2 < Drop$1Tables.script
-if ($status != 0) then
+fi
+
+mysql -uctn -pctn $2 < Drop${1}Tables.script
+if [ $? != 0 ]; then
   echo Could not drop database: $1
   exit 1
-endif
+fi
--- a/cfg_scripts/mysql/DropDB
+++ b/cfg_scripts/mysql/DropDB
@@ -1,15 +1,16 @@
-#!/bin/csh
+#!/bin/bash
 #
 # DropDB
 #
-if ($1 == "") then
+if [ -z $1 ]; then
   echo " "
   echo Usage: "$0 <Database Name>"
   echo " "
   exit
-endif
+fi
+
 mysqladmin -uctn -pctn drop $1
-if ($status != 0) then
+if [ $? != 0 ]; then
   echo Could not drop database: $1
   exit 1
-endif
+fi
--- a/cfg_scripts/mysql/CreateDB
+++ b/cfg_scripts/mysql/CreateDB
@@ -1,15 +1,16 @@
-#!/bin/csh
+#!/bin/bash
 #
 # CreateDB
 #
-if ($1 == "") then
+if [ -z "$1" ]; then
   echo " "
   echo Usage: "$0 <DB Name>"
   echo " "
   exit
-endif
+fi
+
 mysqladmin -uctn -pctn create $1
-if ($status != 0) then
+if [ $? != 0 ]; then
   echo Could not create database: $1
   exit 1
-endif
+fi
