projects
/
dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
105d2fb
)
add install file for zsh
author
Peng Li
<seudut@gmail.com>
Sat, 18 Feb 2017 07:50:44 +0000
(15:50 +0800)
committer
Peng Li
<seudut@gmail.com>
Sat, 18 Feb 2017 07:50:44 +0000
(15:50 +0800)
zsh/install.pl
[new file with mode: 0755]
patch
|
blob
diff --git a/zsh/install.pl
b/zsh/install.pl
new file mode 100755
(executable)
index 0000000..
efed502
--- /dev/null
+++ b/
zsh/install.pl
@@ -0,0
+1,18
@@
+#!/usr/bin/perl -w
+
+use strict;
+use File::Basename;
+use Cwd;
+use Cwd "abs_path";
+
+my $home = $ENV{'HOME'};
+my $zshDir = dirname abs_path(__FILE__);
+my $zshrc = $zshDir . "/zshrc";
+
+die "~/.zsh or ~/.zshrc exist. Backup them first.\n" if -e "$home/.zsh" or -e "$home/.zshrc";
+
+print `ln -s $zshDir $home/.zsh`;
+print `ln -s $zshrc $home/.zshrc`;
+
+print "Done" unless $?;
+