zshrc - fix installation issue
authordebian <debian@debian>
Sat, 6 May 2017 15:22:12 +0000 (23:22 +0800)
committerdebian <debian@debian>
Sat, 6 May 2017 15:22:12 +0000 (23:22 +0800)
zsh/install.pl

index 73b5e47..0f42220 100755 (executable)
@@ -11,21 +11,19 @@ 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`;
 
 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 `ln -s $zshDir $home/.zsh`;
+print `ln -s $zshrc $home/.zshrc`;
+
 print "Done\n" unless $?;