diff --git a/Makefile b/Makefile index f32e07e..a2abf39 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION ?= 0.4.3 +VERSION ?= 0.4.4 CACHE ?= --no-cache=1 FULLVERSION ?= ${VERSION} archs ?= amd64 arm32v6 arm64v8 i386 diff --git a/configure.sh b/configure.sh index 477c928..9996234 100755 --- a/configure.sh +++ b/configure.sh @@ -11,14 +11,6 @@ if [ ! -f /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSe cp /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json fi -if [ -f /opt/JDownloader/credentials ]; then - cred=$(cat /opt/JDownloader/cfg/credentials) - sed -i "s/\"password\" : \"${cred[1]}\",/\"password\" : \"$2\",/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json && \ - sed -i "s/\"email\" : \"${cred[0]}\"/\"email\" : \"$1\"/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json -else - sed -i "s/\"password\" : null,/\"password\" : \"$2\",/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json && \ - sed -i "s/\"email\" : null/\"email\" : \"$1\"/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json -fi - -echo -e "$1\n$2" > /opt/JDownloader/credentials +sed -i "s/\"password\" : [^,]+/\"password\" : \"$2\"/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json && \ +sed -i "s/\"email\" : [^,]+/\"email\" : \"$1\"/" /opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json pkill -f "JDownloader"