-if [ -n "${GRML_LIVE_SOURCES:-}" ] ; then
- DIST=" etch\| stable\| lenny\| squeeze\| wheezy\| testing\| sid\| unstable"
- echo "# generated based on \$GRML_LIVE_SOURCES by grml-live
-$GRML_LIVE_SOURCES" | \
- sed -e "s/\(^deb .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE\4\5/;
- s/\(^deb-src .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE\4\5/" >> "$SOURCES_LIST_OUTPUT"
-else
- cat >> "$SOURCES_LIST_OUTPUT" << EOF
-# generated by grml-live
-deb http://deb.grml.org/ grml-stable main
-deb-src http://deb.grml.org/ grml-stable main
-
-deb http://deb.grml.org/ grml-testing main
-deb-src http://deb.grml.org/ grml-testing main
-
-deb http://cdn.debian.net/debian $SUITE main contrib non-free
-deb-src http://cdn.debian.net/debian $SUITE main contrib non-free
-EOF
-fi
-
-# notice: activate grml-live pool when building against unstable or testing:
-if grep -qwe unstable -qwe sid -qwe testing -qwe wheezy "$SOURCES_LIST_OUTPUT" ; then
- grep -q 'grml-live.*main' "$SOURCES_LIST_OUTPUT" || \
- grep grml-stable "$SOURCES_LIST_OUTPUT" | \
- sed 's/grml-stable/grml-live/' >> "$SOURCES_LIST_OUTPUT"
-else
- grep -q 'grml-live.*main' "$SOURCES_LIST_OUTPUT" && \
- sed -i 's/.*grml-live.*main/# removed grml-live repository/' "$SOURCES_LIST_OUTPUT"
-fi
-