This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

JDownloader

By: a guest on Jan 11th, 2012  |  syntax: Bash  |  size: 0.52 KB  |  views: 83  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/env bash
  2.  
  3. if [ -x "/opt/JDownloader" ]; then
  4.         umask u=rwx,g=rwx,o=rwx
  5.         cd "/opt/JDownloader"
  6.         if [ -e "config" ]; then
  7.                 if [ -d "config" ]; then
  8.                         rmdir "config"
  9.                 else
  10.                         rm "config"
  11.                 fi
  12.         fi
  13.         mkdir -p "${HOME}/.jd/config"
  14.         ln -s "${HOME}/.jd/config" "config"
  15. else
  16.         mkdir -p "${HOME}/.jd"
  17.         cd "${HOME}/.jd"
  18. fi
  19.  
  20. if [ ! -f "JDownloader.jar" ]; then
  21.         wget -O jdupdate.jar http://update0.jdownloader.org/jdupdate.jar
  22.         exec java -jar jdupdate.jar "$@"
  23. else
  24.         exec java -jar JDownloader.jar "$@"
  25. fi
clone this paste RAW Paste Data