summaryrefslogtreecommitdiffstats
path: root/rescue/make_rescue_img
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/make_rescue_img')
-rwxr-xr-xrescue/make_rescue_img9
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";