Emacs - suppress the errors at statup
[dotfiles.git] / emacs.d / install.pl
1 #!/usr/bin/perl -w
2 #
3 #
4 use strict;
5 use File::Basename;
6 use Cwd;
7 use Cwd "abs_path";
8
9
10 my $home = $ENV{'HOME'};
11 my $emacsDir = dirname abs_path (__FILE__);
12
13 die "~/.emacs.d or ~/.init.el or ~/.emacs exist. Backup them first.\n" 
14     if -e "$home/.init.el" or -e "$home/.emacs.d" or -e "$home/.emacs";
15
16 print `ln -s $emacsDir $home/.emacs.d`;
17
18 print "Done.\n" unless $?;