Add debian/install-depends.sh utility
g0dil [Mon, 6 Apr 2009 11:01:47 +0000 (11:01 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1181 270642c3-0616-0410-b53a-bc976706d245

debian/install-depends.sh [new file with mode: 0755]

diff --git a/debian/install-depends.sh b/debian/install-depends.sh
new file mode 100755 (executable)
index 0000000..ee1c875
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+if [ `whoami` != root ]; then
+    echo "Must be root."
+    exit 2
+fi
+
+base="`dirname "$0"`"; base="`cd "$base"; pwd`"
+
+aptitude update
+aptitude install grep-dctrl
+
+packages="$(grep-dctrl -ns Build-Depends senf <"$base/control" \
+       | tr ',\n\t' '   '  \
+       | sed -e 's/([^)]*)//g' -e 's/ \+/ /g' -e 's/ $//')"
+
+aptitude install $packages