#!/bin/bash

######################################################
#   file name: install_ant.sh
#   
#   function:
#   To quickly install ant automatically
#   in linux system...
#   
#   author:    jeffzhao
#   date:      2013.6.19      
#   
#
#
######################################################
ant_package_path="./"
ant_install_path="/opt/test/ant"
ant_package_name="apache-ant-1.9.1-bin.tar.gz"
ant_download_url="http://www.apache.org/dist/ant/binaries"/${ant_package_name}
antMD5_download_url="http://www.apache.org/dist/ant/binaries"/${ant_package_name}.md5
######################################################
#
#
######################################################

function download_ant()
{ 
    wget ${ant_download_url}
    wget ${antMD5_download_url}
}

function check_env() 
{
    # To Make Sure Ant Pakcage Path is Ok
    if [ ! -d ${ant_package_path} ]
    then
        mkdir -p ${ant_package_path}
    fi
   
    # To Make Sure Ant Pakcage is OK

    ls -l ${ant_package_path}|grep *ant*.tar.gz 

    if [ $? == 1 ]
    then
        download_ant
    fi
}

function main()
{
    echo "Preinstall Checking start"
    check_env
}

main

 

相关文章:

  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
猜你喜欢
  • 2021-12-16
  • 2022-01-23
  • 2022-02-23
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案