summaryrefslogtreecommitdiffstats
path: root/move/make_live_tree_boot
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2004-05-11 12:41:07 +0000
committerMystery Man <unknown@mandriva.org>2004-05-11 12:41:07 +0000
commitf0b2cf434b3a176276e79046eafc71a26d94ca3d (patch)
treea2f73175aefefa9f630d80119507e1c95868367e /move/make_live_tree_boot
parent3e4ad5e1b687f262a1d7cc39a0b905a595ac7f95 (diff)
downloaddrakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar
drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.gz
drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.bz2
drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.tar.xz
drakx-f0b2cf434b3a176276e79046eafc71a26d94ca3d.zip
This commit was manufactured by cvs2svn to create branch
'MDK-10-update'.
Diffstat (limited to 'move/make_live_tree_boot')
-rwxr-xr-xmove/make_live_tree_boot25
1 files changed, 11 insertions, 14 deletions
diff --git a/move/make_live_tree_boot b/move/make_live_tree_boot
index 56f52f52a..1af8d537e 100755
--- a/move/make_live_tree_boot
+++ b/move/make_live_tree_boot
@@ -3,11 +3,8 @@
use lib qw(../perl-install);
use common;
use lang;
-use Getopt::Long;
-GetOptions(u => \$un_build) or die '';
-
-my $prefix = $ARGV[0] || `make get_dest_livetree`;
+my $prefix = '/tmp/live_tree';
my @ALLOWED_LANGS = split(' ', first(cat_('move.pm') =~ /ALLOWED_LANGS = qw\((.*)\)/));
sub create_light_tree {
@@ -17,9 +14,9 @@ sub create_light_tree {
-e $light_prefix and die "you can't make_live_tree_boot since one already exists
Maybe you should remove it first with 'make_live_tree_boot -u'\n";
- foreach my $f (@$list) {
- my $dest = "$light_prefix$f";
- my $orig = "$prefix$f";
+ foreach my $orig (@$list) {
+ my $dest = $orig;
+ $dest =~ s|^$prefix|$light_prefix|;
mkdir_p(dirname($dest));
@@ -40,9 +37,9 @@ sub create_totem_links {
my $light_prefix = $prefix . '_' . $live_name;
#- creating all the dirs, even when things are in the "always" tree
- foreach my $f (@$list) {
- my $dest = "$light_prefix$f";
- my $orig = "$prefix$f";
+ foreach my $orig (@$list) {
+ my $dest = $orig;
+ $dest =~ s|^$prefix|$light_prefix|;
mkdir_p(dirname($dest)) if ! (-e $dest || -l $dest);
if (-l $orig) {
@@ -75,9 +72,9 @@ sub remove_light_tree {
-d $light_prefix or return;
- foreach my $f (@$list) {
- my $dest = "$prefix$f";
- my $orig = "$light_prefix$f";
+ foreach my $dest (@$list) {
+ my $orig = $dest;
+ $orig =~ s|^$prefix|$light_prefix|;
if (-l $orig) {
unlink $orig;
@@ -139,7 +136,7 @@ foreach my $lang (@ALLOWED_LANGS) {
remove_light_tree("always_i18n_$lang", []);
}
-if (!$un_build) {
+if (!@ARGV) {
create_light_tree('always', \@always_list);
create_light_tree('boot', \@boot_list);
create_light_tree('totem', \@totem_list);