Changeset 36420 for main/trunk


Ignore:
Timestamp:
2022-08-22T10:34:56+12:00 (20 months ago)
Author:
davidb
Message:

Tweaks to print statements, and running .sh rather than .bash SETUP files

Location:
main/trunk/greenstone3
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-check.sh

    r36416 r36420  
    11#!/bin/bash
    2 
    3 
    4 
    52
    63function check_exists {
     
    1613    echo "  => Found $prog_name executable in PATH"
    1714    else
    18     echo "" 1>&2
    1915    echo "****" 1>&2
    2016    echo "* Failed to find '$prog_name'" 1>&2
    2117    echo "*" 1>&2   
    22     echo "* => Consider running ext/get-${ext_name}.sh" 1>&2
    23     echo "*    and then source its SETUP.bash file" 1>&2
     18    echo "* => Consider running ext-cli/get-${ext_name}.sh" 1>&2
     19    echo "*    and then source ./gs3-setup-cli.sh" 1>&2
    2420    echo "****" 1>&2
    2521    echo "" 1>&2   
     
    3228}
    3329
    34 #echo ""
    35 #echo "===="
    36 #echo "To run Greenstone3:"
    37 #echo "----"
     30check_exists java  "selfcontained-jdk"
     31found_java=1
    3832
    39 check_exists java  "selfcontained-jdk"
    4033check_exists ant   "selfcontained-ant"
    41 #echo "===="
    42 #echo ""
    43 
    44 #echo "===="
    45 #echo "To compile up Greenstone3:"
     34found_ant=1
    4635
    4736check_exists javac "selfcontained-jdk"
     37found_javac=1
    4838
     39if [ $? != 0 ] ; then
     40    if [ $found_java = 1 ] ; then
     41    echo "Having found 'java' but not 'javac' means you can run Greenstone3, but not compile it"
     42    fi
     43fi
    4944
    50 
    51 # Adapted from:
    52 #    https://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script
    53 
    54 #if type -p java > /dev/null ; then
    55 #    echo "  => Found java executable in PATH"
    56 #    _java=java
    57 #else
    58 #    echo "" 1>&2
    59 #    echo "****" 1>&2
    60 #    echo "* Failed to find 'java'" 1>&2
    61 #    echo "*" 1>&2   
    62 #    echo "* => Consider running ext/get-selfcontained-jdk.sh" 1>&2
    63 #    echo "*    and then source its SETUP.bash file" 1>&2
    64 #    echo "****" 1>&2
    65 #    echo "" 1>&2   
    66 #    echo "Exiting check sequence ..." 1>&2
    67 #    echo "" 1>&2
    68 #    exit 1
    69 #fi
    70 
Note: See TracChangeset for help on using the changeset viewer.