X-Git-Url: https://git.exim.org/exim-website.git/blobdiff_plain/212d5d17fd4be13e5b15ac5f97119769bca61630..c40fd8ce7d6795f2411ff5302550f83160c5e82e:/script/gen.pl diff --git a/script/gen.pl b/script/gen.pl index 76734bf..92cff58 100755 --- a/script/gen.pl +++ b/script/gen.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # use strict; use warnings; @@ -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( "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 {