#!/usr/bin/env bash if [[ -x '/opt/JDownloader' ]]; then umask u=rwx,g=rwx,o=rwx cd '/opt/JDownloader' else mkdir -p "${HOME}/.jd" cd "${HOME}/.jd" fi if [ ! -f "JDownloader.jar" ]; then wget -O JDownloader.jar http://installer.jdownloader.org/JDownloader.jar exec java -jar JDownloader.jar "$@" else exec java -jar JDownloader.jar "$@" fi