[18851] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[23982] | 3 | storedir="`pwd`"
|
---|
| 4 | thisdir="`dirname \"$0\"`"
|
---|
| 5 | thisdir="`cd \"$thisdir\" && pwd`"
|
---|
| 6 | cd "$thisdir"
|
---|
| 7 | source setup.bash
|
---|
| 8 |
|
---|
[19250] | 9 | testdone=0
|
---|
| 10 |
|
---|
[23948] | 11 | cgibin="cgi-bin"
|
---|
| 12 | if [ -d "cgi-bin/$GSDLOS$GSDLARCH" ] ; then
|
---|
| 13 | cgibin="cgi-bin/$GSDLOS$GSDLARCH"
|
---|
| 14 | fi
|
---|
| 15 |
|
---|
| 16 |
|
---|
[18851] | 17 | function test-gsdlhome {
|
---|
[19250] | 18 | if [ $testdone == "0" ] ; then
|
---|
| 19 | if test -z "$GSDLHOME" ; then
|
---|
| 20 | echo "" ;
|
---|
| 21 | echo "Environment variable GSDLHOME not set." ;
|
---|
| 22 | echo " This needs to be set to run this gsicontrol command." ;
|
---|
| 23 | echo " Have you run 'source setup.bash'?" ;
|
---|
| 24 | echo "" ;
|
---|
| 25 | exit 1
|
---|
| 26 | else
|
---|
| 27 | echo "Using: " ;
|
---|
| 28 | echo " GSDLHOME = $GSDLHOME" ;
|
---|
| 29 | echo " GSDLOS = $GSDLOS" ;
|
---|
| 30 | fi
|
---|
| 31 | testdone=1
|
---|
[18851] | 32 | fi
|
---|
[19250] | 33 | }
|
---|
[18851] | 34 |
|
---|
| 35 | function configure-cgi {
|
---|
| 36 | test-gsdlhome
|
---|
[23948] | 37 | if test ! -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then
|
---|
| 38 | echo "Configuring $cgibin/gsdlsite.cfg" ;
|
---|
[23982] | 39 | echo "# **** This file is automatically generated, do not edit ****" > "$cgibin/gsdlsite.cfg" ;
|
---|
| 40 | echo "# For local customization of Greenstone, edit gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
|
---|
[23988] | 41 | echo "" >> "$cgibin/gsdlsite.cfg" ;
|
---|
[23982] | 42 | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
|
---|
[18851] | 43 | else
|
---|
| 44 | echo "WARNING: Nothing done for make configure-cgi." ;
|
---|
| 45 | echo " If you wish to regenerate the file " ;
|
---|
[23948] | 46 | echo " $GSDLHOME/$cgibin/gsdlsite.cfg" ;
|
---|
[18851] | 47 | echo " from scratch, delete the existing file first." ;
|
---|
| 48 | fi
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | function configure-admin {
|
---|
| 52 | test-gsdlhome
|
---|
| 53 | echo "" ;
|
---|
| 54 | echo "Configuring admin user password:" ;
|
---|
| 55 | encrypted_password=`getpw` ;
|
---|
| 56 | if [ $? = "0" ] ; then
|
---|
| 57 | echo -e "[admin]\n<enabled>true\n<groups>administrator,colbuilder,all-collections-editor\n<password>$encrypted_password\n<username>admin" \
|
---|
[19140] | 58 | | txt2db -append "$GSDLHOME/etc/users.gdb" ;
|
---|
[18851] | 59 | else
|
---|
| 60 | echo "Did not set password" ;
|
---|
| 61 | fi
|
---|
| 62 | echo ""
|
---|
| 63 | }
|
---|
| 64 |
|
---|
[19250] | 65 |
|
---|
[20619] | 66 | function configure-port-and-connection {
|
---|
[18851] | 67 | test-gsdlhome
|
---|
[20619] | 68 |
|
---|
[18851] | 69 | echo "Enter port number to use:"
|
---|
| 70 | read port ;
|
---|
[20622] | 71 | echo "Enter host IP to allow (127.0.0.1 is included by default):"
|
---|
| 72 | read hostIP ;
|
---|
[23252] | 73 | echo "Enter hostname or list of hosts to allow (localhost included by default):"
|
---|
| 74 | read hosts ;
|
---|
[19250] | 75 | echo "Allow external connections [yes/no]:"
|
---|
[20619] | 76 | read connection ;
|
---|
[23134] | 77 | if [ "x$connection" = "xyes" ] || [ "x$connection" = "xy" ] ; then
|
---|
[20619] | 78 | allowfromall="Allow"
|
---|
| 79 | else
|
---|
[23252] | 80 | allowfromall="Deny"
|
---|
[19250] | 81 | fi
|
---|
| 82 |
|
---|
[20829] | 83 | lib_path_var="LD_LIBRARY_PATH" ;
|
---|
[20838] | 84 | if [ $GSDLOS = "darwin" ] ; then
|
---|
[20829] | 85 | lib_path_var="DYLD_LIBRARY_PATH"
|
---|
| 86 | fi
|
---|
| 87 |
|
---|
[23948] | 88 | if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then
|
---|
| 89 | collecthome=`egrep "^collecthome" "$GSDLHOME/$cgibin/gsdlsite.cfg" | awk '{print $2}'` ;
|
---|
[22635] | 90 | fi
|
---|
| 91 | if test -z $collecthome ; then
|
---|
| 92 | collecthome="$GSDLHOME/collect" ;
|
---|
| 93 | fi
|
---|
| 94 |
|
---|
[18851] | 95 | if test ! -z $port ; then
|
---|
| 96 | echo "Port: $port" ;
|
---|
[23988] | 97 | # if called by reset-gsdlhome, then httpd.conf file was regenerated by install-bindist.sh script and
|
---|
| 98 | # contains placeholder strings, including for Listen port. So can't stop web-server in such a case.
|
---|
| 99 | if test -e "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf" ; then
|
---|
| 100 | confport=`egrep "^Listen" $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf | awk '{print $2}'` ;
|
---|
| 101 | if [ "$confport" != "**PORT**" ] ; then
|
---|
| 102 | echo "Stopping web server (if running)" ;
|
---|
| 103 | web-stop-tested ;
|
---|
| 104 | fi
|
---|
| 105 | fi
|
---|
[18851] | 106 | echo "Setting config file to use port $port";
|
---|
[23948] | 107 | cat "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf.in" \
|
---|
[24901] | 108 | | sed "s@\*\*GSDL_OS_ARCH\*\*@$GSDLOS$GSDLARCH@g" \
|
---|
[18851] | 109 | | sed "s@\*\*PORT\*\*@$port@g" \
|
---|
[20619] | 110 | | sed "s@\*\*CONNECTPERMISSION\*\*@$allowfromall@g" \
|
---|
[20622] | 111 | | sed "s@\*\*HOST_IP\*\*@$hostIP@g" \
|
---|
[23252] | 112 | | sed "s@\*\*HOSTS\*\*@$hosts@g" \
|
---|
[22635] | 113 | | sed "s@\*\*COLLECTHOME\*\*@$collecthome@g" \
|
---|
[18851] | 114 | | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" \
|
---|
[23948] | 115 | | sed "s@\*\*APACHE_HOME_OS\*\*@$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH@g" \
|
---|
[20829] | 116 | | sed "s@\*\*LIBRARY_PATH_VAR\*\*@$lib_path_var@g" \
|
---|
[23948] | 117 | > "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf" ;
|
---|
[18851] | 118 | echo "Type '$0 web-start' to start the web server running on port $port" ;
|
---|
| 119 | fi ;
|
---|
| 120 | echo "Done" ;
|
---|
| 121 | }
|
---|
| 122 |
|
---|
| 123 |
|
---|
| 124 | MONITOR_SUCCESS="MAKE SUCCESSFUL"
|
---|
| 125 | MONITOR_FAILED="MAKE FAILED"
|
---|
| 126 | MONITOR_FINISHED="MAKE DONE"
|
---|
| 127 |
|
---|
| 128 | function configure-apache {
|
---|
| 129 | test-gsdlhome
|
---|
[18866] | 130 | configfile=$1 ;
|
---|
[19023] | 131 | # if no configfile given, launch it with llssite.cfg. Create it from the template if needed.
|
---|
[18866] | 132 | if [ "x$configfile" = "x" ]; then
|
---|
[19023] | 133 | if test ! -e "$GSDLHOME/llssite.cfg" && test -e "$GSDLHOME/llssite.cfg.in" ; then
|
---|
| 134 | cp "$GSDLHOME/llssite.cfg.in" "$GSDLHOME/llssite.cfg" ;
|
---|
| 135 | fi
|
---|
[18866] | 136 | configfile="$GSDLHOME/llssite.cfg";
|
---|
| 137 | fi ;
|
---|
[18851] | 138 | echo "Configuring the apache webserver..." ;
|
---|
[18866] | 139 | port=`egrep "^portnumber" $configfile | awk -F= '{print $2}'` ;
|
---|
[20622] | 140 | hostIP=`egrep "^hostIP" $configfile | awk -F= '{print $2}'` ;
|
---|
[23252] | 141 | hosts=`egrep "^hosts" $configfile | awk -F= '{print $2}'` ;
|
---|
[20603] | 142 |
|
---|
[19250] | 143 | externalaccess=`egrep "^externalaccess" $configfile | awk -F= '{print $2}'` ;
|
---|
[23134] | 144 | if [ "x$externalaccess" = "x1" ] ; then
|
---|
[19250] | 145 | externalaccess="yes"
|
---|
| 146 | else
|
---|
| 147 | externalaccess="no"
|
---|
| 148 | fi
|
---|
| 149 |
|
---|
[23252] | 150 | echo -e "$port\n$hostIP\n$hosts\n$externalaccess" | configure-port-and-connection ;
|
---|
[23948] | 151 | if test -e "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf" ; then
|
---|
[18851] | 152 | echo $MONITOR_SUCCESS;
|
---|
| 153 | else
|
---|
| 154 | echo $MONITOR_FAILED;
|
---|
| 155 | fi
|
---|
| 156 | echo $MONITOR_FINISHED
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | function configure-web {
|
---|
[23975] | 160 | for one_file in gs2-server.app gli.app client-gli.app gems.app ; do
|
---|
[24760] | 161 | if test -e "$one_file/Contents/document.wflow.in" ; then
|
---|
| 162 | if test ! -e "$one_file/Contents/document.wflow" ; then
|
---|
| 163 | sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$one_file/Contents/document.wflow.in" > "$one_file/Contents/document.wflow"
|
---|
| 164 | fi
|
---|
[23975] | 165 | fi
|
---|
| 166 | done ;
|
---|
[23973] | 167 |
|
---|
[18851] | 168 | configure-cgi
|
---|
[18866] | 169 | configure-apache $1
|
---|
[18851] | 170 | }
|
---|
| 171 |
|
---|
[24297] | 172 | # Forces configure-cgi by renaming gsdlsite.cfg
|
---|
| 173 | # but only if we actually *need* to relocate gsdlhome.
|
---|
| 174 | # We relocate at all times, except when there is a gsdlsite.cfg file with its
|
---|
| 175 | # gsdlhome property the same as the current (greenstone installation) directory
|
---|
[23966] | 176 | function reset-gsdlhome {
|
---|
[23973] | 177 | echo "" ;
|
---|
[24297] | 178 | relocate=yes ;
|
---|
[24787] | 179 |
|
---|
| 180 | # don't just update gsdlsite.cfg, but also the path to perl at the top of gliserver.pl
|
---|
| 181 | # if this is a perl included with the Greenstone distribution
|
---|
[23948] | 182 | if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then
|
---|
[24297] | 183 | stored_gsdlhome=`egrep "^gsdlhome" "$cgibin/gsdlsite.cfg" | awk '{print $2}'` ;
|
---|
| 184 | if [ "x$stored_gsdlhome" != "x$GSDLHOME" ]; then
|
---|
| 185 | /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
|
---|
| 186 | echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ;
|
---|
| 187 | echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
|
---|
[24787] | 188 |
|
---|
| 189 | if test -d "$GSDLHOME/bin/$GSDLOS/perl" ; then
|
---|
| 190 | gliserverfile=$GSDLHOME/$cgibin/gliserver.pl ;
|
---|
| 191 | /bin/cp "$gliserverfile" "$gliserverfile.bak" ;
|
---|
| 192 | sed "s@$stored_gsdlhome@$GSDLHOME@g" "$gliserverfile.bak" > "$gliserverfile" ;
|
---|
| 193 | rm -f "$gliserverfile.bak" ;
|
---|
| 194 | fi
|
---|
| 195 |
|
---|
[24297] | 196 | else
|
---|
| 197 | relocate=
|
---|
| 198 | fi
|
---|
| 199 | fi
|
---|
[23973] | 200 |
|
---|
[24297] | 201 | if [ "x$relocate" = "xyes" ]; then
|
---|
| 202 | apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH"
|
---|
| 203 |
|
---|
| 204 | if test ! -e "$apache_home_os/bin/apachectl.in" ; then
|
---|
| 205 | make apache-for-dist
|
---|
| 206 | fi
|
---|
| 207 |
|
---|
| 208 | replace_list="conf/extra/httpd-dav.conf \
|
---|
[23982] | 209 | conf/extra/httpd-manual.conf \
|
---|
| 210 | conf/extra/httpd-autoindex.conf \
|
---|
| 211 | conf/extra/httpd-vhosts.conf \
|
---|
| 212 | conf/extra/httpd-ssl.conf \
|
---|
| 213 | conf/extra/httpd-multilang-errordoc.conf \
|
---|
| 214 | conf/original/extra/httpd-dav.conf \
|
---|
| 215 | conf/original/extra/httpd-manual.conf \
|
---|
| 216 | conf/original/extra/httpd-autoindex.conf \
|
---|
| 217 | conf/original/extra/httpd-vhosts.conf \
|
---|
| 218 | conf/original/extra/httpd-ssl.conf \
|
---|
| 219 | conf/original/extra/httpd-multilang-errordoc.conf \
|
---|
| 220 | conf/original/httpd.conf\
|
---|
| 221 | lib/apr-util-1/apr_dbd_odbc.la \
|
---|
| 222 | lib/apr-util-1/apr_dbd_sqlite3.la \
|
---|
| 223 | lib/pkgconfig/apr-util-1.pc \
|
---|
| 224 | lib/pkgconfig/apr-1.pc \
|
---|
| 225 | lib/libaprutil-1.la \
|
---|
| 226 | lib/libapr-1.la \
|
---|
| 227 | build/config_vars.mk \
|
---|
| 228 | build/config.nice \
|
---|
| 229 | build/apr_rules.mk \
|
---|
| 230 | bin/dbmmanage \
|
---|
| 231 | bin/apu-1-config \
|
---|
| 232 | bin/apr-1-config \
|
---|
| 233 | include/ap_config_auto.h \
|
---|
| 234 | include/ap_config_layout.h"
|
---|
| 235 |
|
---|
[24297] | 236 | for one_file in apachectl envvars envvars-std ; do
|
---|
| 237 | /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"
|
---|
| 238 | done
|
---|
| 239 |
|
---|
| 240 | for one_file in $replace_list ; do
|
---|
| 241 | /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"
|
---|
| 242 | done
|
---|
| 243 |
|
---|
| 244 | /bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config"
|
---|
| 245 |
|
---|
| 246 | /bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config"
|
---|
| 247 |
|
---|
| 248 | /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
|
---|
| 249 |
|
---|
[23988] | 250 | # replace template files with active versions. The following will generate a httpd.conf
|
---|
| 251 | # file with placeholder strings, all of which we'll replace shortly hereafter.
|
---|
[24297] | 252 | bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
|
---|
| 253 |
|
---|
| 254 | log4jprop=$GSDLHOME/lib/java/log4j.properties
|
---|
| 255 | sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop"
|
---|
| 256 |
|
---|
| 257 | for one_file in gs2-server.app gli.app client-gli.app gems.app ; do
|
---|
| 258 | if test -e "$one_file/Contents/document.wflow" ; then
|
---|
| 259 | rm -f "$one_file/Contents/document.wflow"
|
---|
| 260 | fi
|
---|
| 261 | done
|
---|
| 262 |
|
---|
| 263 | configure-web $1
|
---|
| 264 | fi
|
---|
[23945] | 265 | }
|
---|
| 266 |
|
---|
[18851] | 267 | function web-status {
|
---|
| 268 | test-gsdlhome
|
---|
[23948] | 269 | $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin/apachectl status
|
---|
[18851] | 270 | }
|
---|
| 271 |
|
---|
| 272 | function web-start {
|
---|
| 273 | test-gsdlhome
|
---|
[23948] | 274 | $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin/apachectl start
|
---|
[20342] | 275 | if [ $? = 0 ] ; then
|
---|
| 276 | echo $MONITOR_SUCCESS;
|
---|
| 277 | else
|
---|
| 278 | echo $MONITOR_FAILED;
|
---|
| 279 | fi
|
---|
| 280 | echo $MONITOR_FINISHED;
|
---|
[18851] | 281 | }
|
---|
| 282 |
|
---|
| 283 | function web-restart {
|
---|
| 284 | test-gsdlhome
|
---|
[23948] | 285 | $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin/apachectl restart
|
---|
[20342] | 286 | if [ $? = 0 ] ; then
|
---|
| 287 | echo $MONITOR_SUCCESS;
|
---|
| 288 | else
|
---|
| 289 | echo $MONITOR_FAILED;
|
---|
| 290 | fi
|
---|
| 291 | echo $MONITOR_FINISHED;
|
---|
[18851] | 292 | }
|
---|
| 293 |
|
---|
| 294 | function web-graceful {
|
---|
| 295 | test-gsdlhome
|
---|
[23948] | 296 | $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin/apachectl graceful
|
---|
[20342] | 297 | if [ $? = 0 ] ; then
|
---|
| 298 | echo $MONITOR_SUCCESS;
|
---|
| 299 | else
|
---|
| 300 | echo $MONITOR_FAILED;
|
---|
| 301 | fi
|
---|
| 302 | echo $MONITOR_FINISHED;
|
---|
[18851] | 303 | }
|
---|
| 304 |
|
---|
| 305 | function web-stop-tested {
|
---|
| 306 | # This version runs without testing for GSDLHOME
|
---|
| 307 | # Useful to be run as a target when we know test-gsdlhome has already
|
---|
[20637] | 308 | # been done. This avoids an unnecessary repetition of printing
|
---|
[18851] | 309 | # out the values of GSDLHOME and GSDLOS
|
---|
[23948] | 310 | if test -e "$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/conf/httpd.conf" ; then
|
---|
| 311 | $GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH/bin/apachectl stop ;
|
---|
[18851] | 312 | fi
|
---|
| 313 | }
|
---|
| 314 |
|
---|
| 315 | function web-stop {
|
---|
| 316 | test-gsdlhome
|
---|
| 317 | web-stop-tested
|
---|
[20342] | 318 | if [ $? = 0 ] ; then
|
---|
| 319 | echo $MONITOR_SUCCESS;
|
---|
| 320 | else
|
---|
| 321 | echo $MONITOR_FAILED;
|
---|
| 322 | fi
|
---|
| 323 | echo $MONITOR_FINISHED;
|
---|
[18851] | 324 | }
|
---|
| 325 |
|
---|
[19453] | 326 | function usage {
|
---|
[18851] | 327 | echo ""
|
---|
| 328 | echo " Usage: $0 <command>"
|
---|
| 329 | echo " where <command> is any of the following: "
|
---|
| 330 | echo " web-start"
|
---|
| 331 | echo " web-stop"
|
---|
| 332 | echo " web-restart"
|
---|
| 333 | echo " web-status"
|
---|
| 334 | echo " web-graceful"
|
---|
| 335 | echo " configure-admin"
|
---|
[18866] | 336 | echo " configure-web [config-filename]"
|
---|
| 337 | echo " configure-apache [config-filename]"
|
---|
[18851] | 338 | echo " configure-cgi"
|
---|
[24392] | 339 | echo " reset-gsdlhome [config-filename]"
|
---|
| 340 | echo " (Save a copy of $cgibin/gsdlsite.cfg to preserve any customisations)"
|
---|
[18851] | 341 | echo " test-gsdlhome"
|
---|
| 342 | echo " web-stop-tested"
|
---|
| 343 | echo ""
|
---|
[19453] | 344 | }
|
---|
| 345 |
|
---|
| 346 |
|
---|
| 347 | if [[ $# < 1 || $# > 2 ]] ; then
|
---|
| 348 | usage
|
---|
[18851] | 349 | exit 0
|
---|
| 350 | fi
|
---|
| 351 |
|
---|
| 352 | target=$1
|
---|
[18866] | 353 | configfile=$2
|
---|
[18851] | 354 |
|
---|
[20919] | 355 | # remove any extraneous double quotes
|
---|
| 356 | configfile=${configfile//\"/}
|
---|
| 357 |
|
---|
[18851] | 358 | case $target in
|
---|
| 359 | web-start)
|
---|
| 360 | web-start;;
|
---|
| 361 | web-stop)
|
---|
| 362 | web-stop;;
|
---|
| 363 | web-restart)
|
---|
| 364 | web-restart;;
|
---|
| 365 | web-status)
|
---|
| 366 | web-status;;
|
---|
| 367 | web-graceful)
|
---|
| 368 | web-graceful;;
|
---|
| 369 | configure-admin)
|
---|
| 370 | configure-admin;;
|
---|
| 371 | configure-web)
|
---|
[18866] | 372 | configure-web $configfile;;
|
---|
[18851] | 373 | configure-apache)
|
---|
[18866] | 374 | configure-apache $configfile;;
|
---|
[18851] | 375 | configure-cgi)
|
---|
| 376 | configure-cgi;;
|
---|
[20619] | 377 | set-port)
|
---|
| 378 | configure-port-and-connection;;
|
---|
[23945] | 379 | reset-gsdlhome)
|
---|
| 380 | reset-gsdlhome;;
|
---|
[18851] | 381 | test-gsdlhome)
|
---|
| 382 | test-gsdlhome;;
|
---|
| 383 | web-stop-tested)
|
---|
| 384 | web-stop-tested;;
|
---|
[19453] | 385 | *)
|
---|
| 386 | echo
|
---|
| 387 | echo "Command unrecognised: $target"
|
---|
| 388 | usage;;
|
---|
| 389 |
|
---|
[18851] | 390 | esac
|
---|
| 391 |
|
---|
[23982] | 392 | # jump back to directory we originally got called from
|
---|
| 393 | cd "$storedir"
|
---|
[19257] | 394 | exit;
|
---|