Skip to content

Commit

Permalink
fix(installer): revert untested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mscharley committed Sep 20, 2024
1 parent 706c2ed commit 300a841
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
}

sub get_filename {
my $file = shift || $_; # take the first argument or use default ($_)
$file =~ s/\.example$//; # remove '.example' at the end of filename
$file =~ tr/%/\//; # replace '%' with '/'
return $file;
my ($file) = (@_, $_);
$file =~ s/\.(?:example)$//;
$file =~ s!%!/!g;
return $file;
}

sub replace_file {
my ($src_file, $target_file) = @_;
system("rm", "-rf", $target_file); # remove the target file if it exists
link($src_file, $target_file); # create a hard link from src to target
my ($src_file, $target_file) = @_;
system("rm", "-rf", $target_file);
link_file($src_file, $target_file)
}

sub link_file {
Expand Down

0 comments on commit 300a841

Please sign in to comment.