* mk-sbuild-lv: Changed default behaviour so that the initial build and log

directories are not created on first run; instead read settings file and
  check if they exist (LP: #342154).
This commit is contained in:
Jonathan Davies 2009-03-13 09:25:03 +00:00
parent 99f873032b
commit 3d3ad4f42d
2 changed files with 17 additions and 4 deletions

6
debian/changelog vendored
View File

@ -1,6 +1,8 @@
ubuntu-dev-tools (0.67) UNRELEASED; urgency=low
ubuntu-dev-tools (0.67) jaunty; urgency=low
* Changes go here.
* mk-sbuild-lv: Changed default behaviour so that the initial build and log
directories are not created on first run; instead read settings file and
check if they exist (LP: #342154).
-- Jonathan Davies <jpds@ubuntu.com> Mon, 09 Mar 2009 16:03:09 +0000

View File

@ -54,8 +54,6 @@ if [ ! -w /var/lib/sbuild ]; then
# Add self to the sbuild group
sudo adduser "$USER" sbuild
# Create some default build/log areas
mkdir -p ~/ubuntu/build ~/ubuntu/logs
# Prepare a usable default .sbuildrc
if [ ! -e ~/.sbuildrc ]; then
cat > ~/.sbuildrc <<EOM
@ -200,6 +198,19 @@ if [ -r ~/.mk-sbuild-lv.rc ]; then
. ~/.mk-sbuild-lv.rc
fi
# Settings check.
if [ ! -d $build_dir ]; then
echo "Build directory $build_dir does not exist."
echo "Please create it or change the setting in ~/.sbuildrc ."
exit 1
fi
if [ ! -d $log_dir ]; then
echo "Log directory $log_dir does not exist."
echo "Please create it or change the setting in ~/.sbuildrc ."
exit 1
fi
# Does the specified VG exist? (vgdisplay doesn't set error codes...)
if [ `sudo vgdisplay -c "$VG" | wc -l` -eq 0 ]; then
exit 1