From: Peng Li Date: Sat, 18 Feb 2017 07:50:44 +0000 (+0800) Subject: add install file for zsh X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;h=13c5ade6dc04b91c00b64d4a0464d3b5def1d5b4;p=dotfiles.git add install file for zsh --- diff --git a/zsh/install.pl b/zsh/install.pl new file mode 100755 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 $?; +