download.sh 387 B

123456789101112
  1. #!/bin/bash
  2. # Author: yeho <lj2007331 AT gmail.com>
  3. # Blog: http://blog.linuxeye.com
  4. Download_src()
  5. {
  6. [ -s "${src_url##*/}" ] && echo "${src_url##*/} found" || wget -c --no-check-certificate $src_url
  7. if [ ! -e "${src_url##*/}" ];then
  8. echo -e "\033[31m${src_url##*/} download failed, Please contact the author! \033[0m"
  9. kill -9 $$
  10. fi
  11. }