From 6ffed269b8b1bb0eb9764650bad0d56149aa1221 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Sun, 20 Jan 2019 10:42:33 +0000
Subject: [PATCH] Skip sources.list replacement for raspbian (not officially
 supported, but might work)

---
 src/freedombone-utils-repos | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/freedombone-utils-repos b/src/freedombone-utils-repos
index ab33c2dc5..7a2bd12e2 100755
--- a/src/freedombone-utils-repos
+++ b/src/freedombone-utils-repos
@@ -36,6 +36,16 @@ function create_repo_sources {
     rm -rf /var/lib/apt/lists/*
     $CLEAN_PACKAGES
 
+    if [ -f /etc/apt/sources.list ]; then
+        # if this is raspbian then skip the replacement and hope for the best
+        if grep -q "raspbian" /etc/apt/sources.list; then
+            $UPDATE_PACKAGES
+            $INSTALL_PACKAGES apt-transport-https
+            mark_completed "${FUNCNAME[0]}"
+            return
+        fi
+    fi
+
     { echo "deb http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION} main";
       echo "deb-src http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION} main";
       echo '';
@@ -50,7 +60,6 @@ function create_repo_sources {
 
     $UPDATE_PACKAGES
     $INSTALL_PACKAGES apt-transport-https
-
     mark_completed "${FUNCNAME[0]}"
 }
 
-- 
GitLab