From 13c5ade6dc04b91c00b64d4a0464d3b5def1d5b4 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Sat, 18 Feb 2017 15:50:44 +0800 Subject: [PATCH] add install file for zsh --- zsh/install.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 zsh/install.pl 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 $?; + -- 2.11.0