summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-17 18:59:26 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-17 18:59:26 +0000
commit561e863fc2744c6930227e35b9e63c4b567988a5 (patch)
tree1787d696ab9e0449115aa229897c3f69d80550e8 /tools
parent7b9df28a897611b477dc13bdfb6b07cb9a7dce1b (diff)
downloaddrakx-561e863fc2744c6930227e35b9e63c4b567988a5.tar
drakx-561e863fc2744c6930227e35b9e63c4b567988a5.tar.gz
drakx-561e863fc2744c6930227e35b9e63c4b567988a5.tar.bz2
drakx-561e863fc2744c6930227e35b9e63c4b567988a5.tar.xz
drakx-561e863fc2744c6930227e35b9e63c4b567988a5.zip
don't use 'noregion' subdir if $live->{regions} doesn't exist
Diffstat (limited to 'tools')
-rwxr-xr-xtools/draklive11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/draklive b/tools/draklive
index 3086addeb..c629438de 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -247,16 +247,19 @@ sub run_ {
run_program::raw($options, @_);
}
+sub get_region_suffix {
+ my ($live) = @_;
+ defined $live->{system}{region} ? $live->{system}{region} . '/' : ref $live->{regions} ? 'noregion/' : '';
+}
+
sub get_workdir {
my ($live) = @_;
- $live->{copy_wizard} ?
- $live->{workdir} :
- $live->{workdir} . '/' . ($live->{system}{region} || 'noregion');
+ $live->{workdir} . get_region_suffix($live);
}
sub get_system_root {
my ($live) = @_;
- $live->{system}{root} . '/' . ($live->{system}{region} || 'noregion');
+ $live->{workdir} . get_region_suffix($live);
}
sub get_initrd_path {