Changeset 34425

Show
Ignore:
Timestamp:
04.10.2020 16:41:42 (3 weeks ago)
Author:
davidb
Message:

More robust version; takes into account dir change from 'jar' to 'jars'

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/mars-src/trunk/GET-WEKA.sh

    r34420 r34425  
    11#!/bin/bash 
    22 
    3 wget --no-check-certificate https://gigenet.dl.sourceforge.net/project/weka/weka-3-8/3.8.4/weka-3-8-4.zip  
     3major=3 
     4minor=8 
     5subminor=4 
    46 
     7fversion=$major-$minor-$subminor 
     8weka_froot="weka-$fversion" 
     9 
     10 
     11if [ ! -f jars/$weka_froot.zip ] ; then 
     12    echo "****" 
     13    echo "* Downloading $weka_froot.zip from SourceForge" 
     14    echo "****" 
     15     
     16    wget --no-check-certificate -O "jars/$weka_froot.zip" \ 
     17    "https://gigenet.dl.sourceforge.net/project/weka/weka-$major-$minor/$major.$minor.$subminor/$weka_froot.zip"  
     18 
     19    echo "" 
     20else 
     21    echo "****" 
     22    echo "* Already have $weka_froot.zip downloaded" 
     23    echo "****" 
     24    echo "" 
     25fi 
     26 
     27if [ ! -d jars/$weka_froot ] ; then 
     28    echo "****" 
     29    echo "* Unzippuing jars/$weka_froot.zip" 
     30    echo "****" 
     31    cd jar && unzip $weka_froot.zip && cd .. 
     32 
     33    echo "" 
     34else 
     35    echo "****" 
     36    echo "* Already have $weka_froot.zip upzipped" 
     37    echo "****" 
     38    echo "" 
     39fi 
     40 
     41if [ ! -f jars/weka.jar ] ; then 
     42    echo "****" 
     43    echo "* Copying jars/$weka_froot/weka.jar to jars/." 
     44    echo "****" 
     45 
     46    /bin/cp jars/$weka_froot/weka.jar jars/. 
     47 
     48    echo "" 
     49else 
     50    echo "****" 
     51    echo "* Already have weka.jar copied to jars/." 
     52    echo "****" 
     53    echo "" 
     54fi 
     55 
     56 
     57 
     58