mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 16:11:15 +00:00
mk-sbuild-lv: updates to fix for bug 342154 (actually create directories)
This commit is contained in:
parent
7105552708
commit
a0f1b047a7
20
mk-sbuild-lv
20
mk-sbuild-lv
@ -78,6 +78,14 @@ if [ ! -w /var/lib/sbuild ]; then
|
||||
1;
|
||||
EOM
|
||||
sensible-editor ~/.sbuildrc
|
||||
# Create target directories, if needed
|
||||
eval $(egrep '^\$(build|log)_dir[ ]*=' ~/.sbuildrc | cut -c2-)
|
||||
if [ -n "$log_dir" ]; then
|
||||
mkdir -p "$log_dir"
|
||||
fi
|
||||
if [ -n "$build_dir" ]; then
|
||||
mkdir -p "$build_dir"
|
||||
fi
|
||||
else
|
||||
echo "Your ~/.sbuildrc already exists -- leaving it as-is."
|
||||
fi
|
||||
@ -210,18 +218,6 @@ if [ $DEBIAN ] && [ ! -x /usr/bin/cdebootstrap ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user