]> piware.de Git - bin.git/commitdiff
add schrootbd
authorMartin Pitt <martin.pitt@ubuntu.com>
Sat, 6 Dec 2014 12:30:33 +0000 (13:30 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sat, 6 Dec 2014 12:30:33 +0000 (13:30 +0100)
schrootbd [new file with mode: 0755]

diff --git a/schrootbd b/schrootbd
new file mode 100755 (executable)
index 0000000..2e0d400
--- /dev/null
+++ b/schrootbd
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+schroot="$1"
+pkg="$2"
+
+if [ -z "$pkg" ]; then
+    echo "Usage: $0 <schroot> <srcpkg>" >&2
+    exit 1
+fi
+
+SESSID=$(schroot -b -c "$schroot" -n "schroot-$schroot-$pkg")
+schroot -r -c session:$SESSID -u root -- apt-get -y build-dep "$pkg"
+echo "You will now be put into the schroot. It will NOT be cleaned up when you exit this shell!"
+schroot -r -c session:$SESSID