Revision 25124,
584 bytes
checked in by geofft, 14 years ago
(diff) |
daschroot: Tell me what session I'm in
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[25116] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # Gives you an interactive shell with Debathena repositories configured |
---|
| 4 | |
---|
[25118] | 5 | if [ -z "$1" ] || [ -z "$2" ]; then |
---|
| 6 | echo "usage: daschroot <dist> <arch>" |
---|
[25116] | 7 | exit 1 |
---|
| 8 | fi |
---|
[25118] | 9 | dist="$1" |
---|
| 10 | arch="$2" |
---|
| 11 | shift 2 |
---|
[25116] | 12 | |
---|
[25118] | 13 | if ! schroot -c "$dist-$arch-sbuild" -i >/dev/null; then |
---|
[25116] | 14 | exit $? |
---|
| 15 | fi |
---|
| 16 | |
---|
[25118] | 17 | session=$(schroot -c "$dist-$arch-sbuild" -b) |
---|
| 18 | schroot -c "$session" -r -u root -- env SBUILD_BUILD_CONF_DISTRIBUTION="$dist" "$(readlink -f "$(dirname "$0")/chroot-sources")" |
---|
[25124] | 19 | if [ "$#" -gt 0 ]; then |
---|
| 20 | echo "I: Entering schroot session $session" |
---|
| 21 | fi |
---|
[25116] | 22 | schroot -c "$session" -r "$@" |
---|
| 23 | schroot -c "$session" -e |
---|
Note: See
TracBrowser
for help on using the repository browser.