From: Nigel Metheringham Date: Fri, 7 Jan 2011 12:15:26 +0000 (+0000) Subject: Fix issue where existing symlink is not updated X-Git-Tag: exim-4_89_1~74 X-Git-Url: https://git.exim.org/exim-website.git/commitdiff_plain/7dbb215136b6b2471b40b55e3f285935df110224 Fix issue where existing symlink is not updated also failed silently :-( --- diff --git a/script/gen.pl b/script/gen.pl index 76734bf..82ab224 100755 --- a/script/gen.pl +++ b/script/gen.pl @@ -26,7 +26,9 @@ do_web() if exists $opt{web}; ## Add the exim-html-current symlink print "Symlinking exim-html-current to exim-html-$opt{latest}\n"; -symlink( "$opt{docroot}/exim-html-$opt{latest}", "$opt{docroot}/exim-html-current" ); +unlink("$opt{docroot}/exim-html-current") if ( -l "$opt{docroot}/exim-html-current" ); +symlink( "$opt{docroot}/exim-html-$opt{latest}", "$opt{docroot}/exim-html-current" ) + || die "symlink to $opt{docroot}/exim-html-current failed"; ## Generate the website files sub do_web {