mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
install.pl: made directory creation work properly
This commit is contained in:
parent
b4dc577c24
commit
c1a540bb45
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ my $home = bsd_glob('~', GLOB_TILDE);
|
|||
|
||||
if(grep /^(?:-h|--help|-\?)$/, @ARGV) {
|
||||
print <<EOH;
|
||||
install.pl: installs symbollic links from dotfile repo into your home directory
|
||||
install.pl: installs symbolic links from dotfile repo into your home directory
|
||||
|
||||
Options:
|
||||
-f force an overwrite existing files
|
||||
|
@ -33,7 +33,7 @@ my $force = 0;
|
|||
$force = 1 if grep /^(?:-f|--force)$/, @ARGV;
|
||||
|
||||
unless(eval {symlink('', ''); 1;}) {
|
||||
die "Your symbollic links are not very link-like.\n";
|
||||
die "Your symbolic links are not very link-like.\n";
|
||||
}
|
||||
|
||||
my %links = (
|
||||
|
@ -58,7 +58,7 @@ my %links = (
|
|||
|
||||
for my $file (keys %links) {
|
||||
my($path) = $links{$file} =~ m{^ (.+/)? [^/]+ $}x;
|
||||
mkpath($path) if $path;
|
||||
mkpath("$home/$path") if $path;
|
||||
|
||||
my $src = "$scriptdir/$file";
|
||||
my $dest = "$home/$links{$file}";
|
||||
|
|
Loading…
Add table
Reference in a new issue