For some downloads lgogdownloader return always the exit code 141 after a successful download. Because of this the dlagent should catch this exit code.
I have already try some dlagents, but non of this works:
DLAGENTS+=('gogdownloader::/usr/bin/lgogdownloader --download-file=%u -o %o || /usr/bin/test $? -eq 141')
Error: unrecognised option '-eq'
DLAGENTS+=('gogdownloader::/usr/bin/bash -c \"lgogdownloader --download-file=%u -o %o || test $? -eq 141\"')
--download-file=gogdownloader://2146639313/en3installer0: -c: line 0: unexpected EOF while looking for matching `"'
--download-file=gogdownloader://2146639313/en3installer0: -c: line 1: syntax error: unexpected end of file
Your problem is that you incorrectly escape the
"
inside a'
string. This reproduces your 2nd error message:The 1st occurence of
\"
is treated as that literal sequence, while the 2nd occurence escapes the quotation, leaving you with an never-ending string. Removing the escape, you get the desired result: