Changeset 36442


Ignore:
Timestamp:
2022-08-22T16:45:11+12:00 (20 months ago)
Author:
davidb
Message:

Evolving script to check-out and prepare packages

Location:
main/trunk/greenstone3/ext-cli
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/ext-cli/get-selfcontained-ant.sh

    r36436 r36442  
    33OS_ALLCAPS=`uname | tr 'a-z' 'A-Z'`
    44
     5selfcon_ext=selfcontained-ant
     6installed_dir=${selfcon_ext}/apache-ant
     7
    58echo ""
    6 if [ ! -d selfcontained-ant ] ; then
    7     echo "Checking from svn: Greenstone3's selfcontained-ant extension"
    8     svn co https://svn.greenstone.org/gs3-extensions/selfcontained-ant/trunk selfcontained-ant
     9if [ ! -d $selfcon_ext ] ; then
     10    echo "Checking from svn: Greenstone3's $selfcon_ext extension"
     11    svn co https://svn.greenstone.org/gs3-extensions/$selfcon_ext/trunk $selfcon_ext
    912
    1013    if [ $? != 0 ] ; then
    1114    echo "Error encountered checking out: " 1>&2
    12     echo "    svn co https://svn.greenstone.org/gs3-extensions/selfcontained-ant/trunk selfcontained-ant" 1>&2
     15    echo "    svn co https://svn.greenstone.org/gs3-extensions/$selfcon_ext/trunk $selfcon_ext" 1>&2
    1316    exit 1
    1417    fi
    1518else
    16     echo "Detected directory 'selfcontained-ant'"
     19    echo "Detected directory '$selfcon_ext'"
    1720    echo "=> Taken to mean that the svn check-out command has already been run"
    1821fi
    1922
    2023echo ""
    21 if [ ! -d selfcontained-ant/apache-ant ] ; then
    22     echo "Runing the selfcontained-ant/PREPARE-${OS_ALLCAPS}.sh"
     24if [ ! -d $installed_dir ] ; then
     25    echo "Runing the $selfcon_ext/PREPARE-${OS_ALLCAPS}.sh"
    2326
    24     cd selfcontained-ant && ./PREPARE-${OS_ALLCAPS}.sh
     27    cd $selfcon_ext && ./PREPARE-${OS_ALLCAPS}.sh
    2528
    2629    if [ $? != 0 ] ; then
    2730    echo "Error encountered running: " 1>&2
    28     echo "        cd selfcontained-ant && ./PREPARE-${OS_ALLCAPS}.sh" 1>&2
     31    echo "        cd $selfcon_ext && ./PREPARE-${OS_ALLCAPS}.sh" 1>&2
    2932    exit 1
    3033    fi
    3134   
    3235else
    33     echo "Detected directory 'selfcontained-ant/apache-ant'"
    34     echo "=> Taken to mean that the selfcontained-ant/PREPARE-${OS_ALLCAPS}.sh command has already been run"   
     36    echo "Detected directory '$installed_dir'"
     37    echo "=> Taken to mean that the $selfcon_ext/PREPARE-${OS_ALLCAPS}.sh command has already been run"   
    3538fi
    3639
    3740
    38 if [ "x$JAVA_HOME" != "x$PWD/selfcontained-ant/apache-ant" ] ; then
     41if [ "x$ANT_HOME" != "x$PWD/$installed_dir" ] ; then
    3942    echo ""
    4043    echo "To use this installed version of Apache Ant, in the top-level Greenstone3 directory run:"
     
    4346else
    4447    echo ""
    45     echo "Detected JAVA_HOME set to \$PWD/selfcontained-ant/apache-ant"
    46     echo "=> Taken to mean that the selfcontained-ant SETUP.sh file has been sourced"
     48    echo "Detected ANT_HOME set to \$PWD/$installed_dir"
     49    echo "=> Taken to mean that the $selfcon_ext SETUP.sh file has been sourced"
    4750fi
    4851
Note: See TracChangeset for help on using the changeset viewer.