If [[ "$DONE" != 1 ]] && echo "Failed to do composer install" && exit 1
is at the end of a shell script, even if DONE is 1, this will return with error
exit status. That's because [[ $DONE != 1 ]] has exitcode 1 and thus anything after && doesn't get executed
and the entire scripts exits the last exit code it seen (which is 1).
Jessie has a line that looks like this, now-a-days, so the regex is no
longer matching:
deb http://security.debian.org/debian-security jessie/updates main
But because that line was changed, downloads are also working correctly
out-of-the-box. The sed was originally added in #18530.