various fixes
[distro-setup] / distro-end
index 38bd60b7d2a5c10ef95f8ac272d24f4e68e9e4be..f12d57515672f0de4020fb8a1b840b21fd26c983 100755 (executable)
@@ -261,13 +261,19 @@ fi
 case $distro in
     arch) pi syncthing ;;
     ubuntu|debian)
-        # google led me here:
-        # https://apt.syncthing.net/
-        curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
-        s="deb http://apt.syncthing.net/ syncthing release"
-        if [[ $(cat /etc/apt/sources.list.d/syncthing.list) != $s ]]; then
-            echo "$s" | s dd of=/etc/apt/sources.list.d/syncthing.list
-            p update
+        # testing has relatively up to date packages
+        if ! isdebian-testing; then
+            # based on error when doing apt-get update:
+            # E: The method driver /usr/lib/apt/methods/https could not be found.
+            pi apt-transport-https
+            # google led me here:
+            # https://apt.syncthing.net/
+            curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
+            s="deb http://apt.syncthing.net/ syncthing release"
+            if [[ $(cat /etc/apt/sources.list.d/syncthing.list) != $s ]]; then
+                echo "$s" | s dd of=/etc/apt/sources.list.d/syncthing.list
+                p update
+            fi
         fi
         pi syncthing
         ;;