Last active
August 29, 2015 14:20
-
-
Save underr/7d625bdea648109c5887 to your computer and use it in GitHub Desktop.
punkto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zshrc .zshrc | |
vimrc .vimrc | |
tmuxconf .tmux.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use File::Copy qw(copy); | |
# Copia dotfiles para a $HOME | |
# Feito na mão porque todas as ferramentas que já existiam para isso foram criadas por macfags em linguagens de bicha | |
# Usa um arquivo no formato homeru (.ho) (variação sem categorias) para a configuração | |
my $punk = <<PUNK; | |
| | |
\ | / | |
. \ | / . | |
`-.__|\/_\/|_.-' | |
.__ \ / `./ | |
`- | | |
.-'`. · - punkto 1.0.0 | |
' ` __.' | |
_)___( | |
// \\ | |
| | | \ | |
| | | \ | |
PUNK | |
my $config = '_config.ho'; | |
my @lines; | |
print $punk; | |
open(my $F, "<", $config) | |
or die "Não foi possível abrir o arquivo: $!\n"; | |
while(<$F>) { | |
chomp; | |
push @lines, $_; | |
} | |
close $F; | |
for(@lines) { | |
my @ss = split(' ', $_); | |
copy $ss[0], $ENV{HOME} . "/" . $ss[1]; | |
print $ss[0] . " => " . $ss[1] . "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment