aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_css8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/make_css b/bin/make_css
index 6a70aba01..b99459cda 100755
--- a/bin/make_css
+++ b/bin/make_css
@@ -19,6 +19,7 @@ use MIME::Base64;
use MIME::Types;
use Path::Tiny;
use Pod::Usage;
+use Try::Tiny;
# Store ARGV in case we need to restart later.
my @ARGVorig = @ARGV;
@@ -125,7 +126,12 @@ sub compile {
sub write_if_different {
my ($fn, $data) = @_;
$fn = path($fn);
- my $current = $fn->slurp_utf8;
+ my $current = try {
+ $fn->slurp_utf8;
+ } catch {
+ return if $_->{err} eq 'No such file or directory';
+ die $_;
+ };
if (!$current || $current ne $data) {
$fn->spew_utf8($data);
return 1;