add readme, use apache license
[distro-setup] / distro-begin
index b0fcdf521f0d1a35b8c71bc10644c02345d67f41..5ffb0d288e3b4cf2fb161deaf19de67dc82bdc4e 100755 (executable)
@@ -1,6 +1,18 @@
 #!/bin/bash -l
 # Copyright (C) 2016 Ian Kelling
-# This program is under GPL v. 3 or later, see <http://www.gnu.org/licenses/>
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # todo. dunno why, but original bootstrap of timezone is not sticking.
 # fixed manually with:
@@ -233,21 +245,11 @@ isfedora && tu /etc/sysctl.conf 'kernel.sysrq = 1'
 
 if isdebian; then
     codename=$(debian-codename)
-    # non-existent var, as Im not planning to use stable right now
-    if isdebian-stable; then
-        if has_x; then
-            s dd of=/etc/apt/sources.list.d/mozilla-iceweasel.list <<EOF
+    if isdebian-stable && has_x; then
+        s dd of=/etc/apt/sources.list.d/mozilla-iceweasel.list <<EOF
 deb http://mozilla.debian.net/ $codename-backports firefox-release
 deb-src http://mozilla.debian.net/ $codename-backports firefox-release
 EOF
-        fi
-
-        # we change the mirror from the default, so we cant use tu
-        s dd of=/etc/apt/sources.list.d/main-backports.list <<EOF
-deb http://http.debian.net/debian $codename-backports main contrib non-free
-deb-src http://http.debian.net/debian $codename-backports main contrib non-free
-EOF
-
         p update
         # take care of mozilla signing errors in previous command
         pi pkg-mozilla-archive-keyring
@@ -322,15 +324,6 @@ fi
 s lnf /q/root/.editor-backups /q/root/.undo-tree-history \
   /a/opt /a/c/.emacs.d $HOME/mw_vars /k/backup /root
 
-d=/q/p/c/machine_specific/$HOSTNAME/.unison
-if ! s test -L /root/.unison && [[ $(s find /root/.unison -prune -empty) ]]; then
-    mkdir -p $d
-    s chown -R $USER:$USER /root/.unison
-    s cp -rT /root/.unison $d
-fi
-s lnf -T $d /root/.unison
-
-
 rootsshsync
 
 s lnf /a/c/.inputrc /a/c/.vim /a/c/.vimrc /a/c/.gvimrc /root
@@ -353,16 +346,23 @@ case $(distro-name) in
             if isdebian-stable; then
                 pi firefox/$codename-backports
             else
-                pi firefox/unstable # has no unstable dependencies
+                # for a while, firefox/unstable had all it\'s deps satisfied
+                # by testing packages, but now i hit a conflict,
+                # it wanted a newer libfontconfig1, but emacs build-deps
+                # wanted an older one. Oh well, they seem to release
+                # a new esr version every 9 months or so.
+                pi firefox-esr
             fi
         fi
         # for hosts which require nonfree drivers
-        case $HOSTNAME in
-            tp|x2) : ;;
-            *) pi linux-image-amd64 firmware-linux-nonfree \
-                  firmware-linux-free linux-headers-amd64
-               ;;
-        esac
+        # i previously had extra packages listed here linux-image-amd64
+        # firmware-linux-free linux-headers-amd64, but I
+        # don\'t see any reason why. seems to work in testing without.
+        # remove this note if it continues to work.
+        p=firmware-linux-nonfree
+        if apt-cache show $p &>/dev/null; then
+            pi $p
+        fi
         ;;&
     ubuntu|debian)
         if has_x; then
@@ -530,9 +530,18 @@ EOF
         ;;&
     ubuntu|debian|fedora)
         if has_x; then
-            pi xkbset
-        fi
-        ;;&
+            if isdebian-stable; then
+                pi xkbset
+            else
+                # xkbset was in testing for quite a while, dunno
+                # why it's not anymore. Sometime I should check and
+                # see if it's back in testing, but the unstable package
+                # doesn't upgrade anything form testing, and it's tiny
+                # so I'm not bothering to automate it.
+                pi xkbset/unstable
+fi
+fi
+;;&
 esac
 
 if has_x; then