X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=zsh%2Finstall.pl;h=73b5e47dc4cfe496bd401983c72e906a4f76fc28;hb=6fca40e0415573e01b13de22db58a972e355c832;hp=efed502e47fd14894a653c5225817e1c8e2212f5;hpb=13c5ade6dc04b91c00b64d4a0464d3b5def1d5b4;p=dotfiles.git diff --git a/zsh/install.pl b/zsh/install.pl index efed502..73b5e47 100755 --- a/zsh/install.pl +++ b/zsh/install.pl @@ -14,5 +14,18 @@ die "~/.zsh or ~/.zshrc exist. Backup them first.\n" if -e "$home/.zsh" or -e "$ print `ln -s $zshDir $home/.zsh`; print `ln -s $zshrc $home/.zshrc`; -print "Done" unless $?; +my $zshsyntaxDir = $zshDir . "plugins/zsh-syntax-highlighting"; + +if (not -e $zshsyntaxDir) { + die "zsh syntax highlighting not exist, abort.\n"; +} elsif (-s $zshsyntaxDir) { + print " clone submoduells\n "; + chdir $zshsyntaxDir; + ! system "git submodule init" or die $!; + ! system "git submodule update" or die $!; +} else { + print "zsh syntax submodule already exists.\n"; +} + +print "Done\n" unless $?;