diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-07-23 22:15:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-07-23 22:15:54 +0000 |
commit | d97b226e3049c136401416aaceaba39587cd0605 (patch) | |
tree | fa094813196f6d3f8615c3f999d116cf1566ca08 /rescue/make_rescue_img | |
parent | f01f53d988172e9d5bf52e969dd404dc48458000 (diff) | |
download | drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.gz drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.bz2 drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.tar.xz drakx-backup-do-not-use-d97b226e3049c136401416aaceaba39587cd0605.zip |
no_comment
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-x | rescue/make_rescue_img | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index 9ea6b3c67..d6667519e 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -22,15 +22,14 @@ BEGIN { undef *_; } sub __ { print @_, "\n"; system(@_); } sub _ { __ @_; $? and die; } -sub install { +sub install_ { return if -e "$tmp$_[0]"; my $d = dirname($_[0]); commands::mkdir_("-p", "$tmp$d") unless -d "$tmp$d"; - _ "$sudo cp -a $_[0] $tmp$d"; -} -sub install_lib { - _ "cp $_[0] $tmp$_[0]" unless -e "$tmp$_[0]"; + _ "$sudo cp $_[1] $_[0] $tmp$d"; } +sub install { install_($_[0], "-a") } +sub install_lib { install_($_[0], "") } _ "$sudo rm -rf $tmp" if -e $tmp; _ "mkdir $tmp"; |