zoukankan      html  css  js  c++  java
  • 写个自动下载安装Ant的shell脚本【一】

    #!/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
  • 相关阅读:
    css3
    ubuntu /mac 终端命令大全
    MarkDown的语法的简要规则
    向github上传一个项目
    datatable 去掉默认功能
    datatable 自定义筛选
    vuex
    es6入门教程
    datatable 指定添加排序,根据列的值来设置颜色
    在ios上块点击出现闪黑底
  • 原文地址:https://www.cnblogs.com/unixshell/p/3145068.html
Copyright © 2011-2022 走看看