get repositories set up and run inapt
authorOwen Smith <owen@omsmith.ca>
Wed, 15 May 2013 05:36:12 +0000 (01:36 -0400)
committerOwen Smith <owen@omsmith.ca>
Wed, 15 May 2013 05:36:12 +0000 (01:36 -0400)
bootstrap.sh [new file with mode: 0755]
templates/csclub.list [new file with mode: 0644]
templates/emdebian.list [new file with mode: 0644]

diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755 (executable)
index 0000000..82581eb
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+function pause() {
+    read -n1 -s -p "$1"
+}
+
+echo bootstrapping machine...
+
+grep 'http://mirror' /etc/apt/sources.list > /dev/null \
+     || pause "Update /etc/apt/sources.list to use mirror before continuing..."
+
+# some packages used for initial setup
+###apt-get update
+###apt-get install sed curl
+
+DISTRO=`lsb_release -sc`
+
+# we'll be adding emdebian repo if we're on debian
+if [[ `lsb_release -si` = "Debian" ]] ; then
+    apt-get install emdebian-archive-keyring
+    cp ./templates/emdebian.list > /etc/apt/sources.list.d/emdebian.list
+fi
+
+# add csclub repo
+sed "s/<distribution>/$DISTRO/" < ./templates/csclub.list > /etc/apt/sources.list.d/csclub.list
+curl -s http://debian.csclub.uwaterloo.ca/csclub.asc | apt-key add -
+
+apt-get update
+
+# lets get inapt going
+apt-get install inapt
+
+pause "Verify node is correct in pacakges/nodes.ia before continuing..."
+inapt packages/*.ia
+
diff --git a/templates/csclub.list b/templates/csclub.list
new file mode 100644 (file)
index 0000000..3aace6a
--- /dev/null
@@ -0,0 +1,2 @@
+deb http://debian.csclub.uwaterloo.ca/ <distribution> main contrib non-free
+deb-src http://debian.csclub.uwaterloo.ca/ <distribution> main contrib non-free
diff --git a/templates/emdebian.list b/templates/emdebian.list
new file mode 100644 (file)
index 0000000..bd57230
--- /dev/null
@@ -0,0 +1,2 @@
+deb http://mirror.csclub.uwaterloo.ca/emdebian/ squeeze main
+deb-src http://mirror.csclub.uwaterloo.ca/emdebian/ squeeze main