Changeset 36483


Ignore:
Timestamp:
2022-08-25T11:26:45+12:00 (5 weeks ago)
Author:
davidb
Message:

Changed how full dir to script's location is worked out, based on StackOverflow article

Location:
main/trunk/greenstone3/service.d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/service.d/greenstone3-start.sh

    r34323 r36483  
    11#!/bin/bash
    22
    3 full_progname=`pwd`/${BASH_SOURCE}
    4 full_parentdir=${full_progname%/*/*}
     3# See: https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh/29835459#29835459
    54
    6 cd "$full_parentdir" && . ./gs3-setup.sh && ant start
     5full_progdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
     6full_parentdir=${full_progdir%/*}
    77
     8cd "$full_parentdir" && . ./gs3-setup-cli.sh && . ./gs3-setup.sh && ant start
     9
  • main/trunk/greenstone3/service.d/greenstone3-stop.sh

    r34323 r36483  
    11#!/bin/bash
    22
    3 full_progname=`pwd`/${BASH_SOURCE}
    4 full_parentdir=${full_progname%/*/*}
     3# See: https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh/29835459#29835459
    54
    6 cd "$full_parentdir" && . ./gs3-setup.sh && ant stop
     5full_progdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
     6full_parentdir=${full_progdir%/*}
     7
     8cd "$full_parentdir" && . ./gs3-setup-cli.sh && . ./gs3-setup.sh && ant stop
    79
    810
Note: See TracChangeset for help on using the changeset viewer.