summaryrefslogtreecommitdiffstats
path: root/move/make_live_tree_boot
diff options
context:
space:
mode:
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);