diff --git a/scripts/build-book b/scripts/build-book index 4b56c42..5572774 100755 --- a/scripts/build-book +++ b/scripts/build-book @@ -63,6 +63,7 @@ sub katla($src, $ttc-src) { $output ~~ s:g/'class="IdrisData"'/class="hljs-title"/; $output ~~ s:g/'class="IdrisType"'/class="hljs-type"/; $output ~~ s:g/'class="IdrisNamespace"'/class="hljs-symbol hljs-emphasis"/; + # Spurt the output to the temporary directory my $output-path = $tempdir.add: $src; if !$output-path.parent.d { @@ -92,3 +93,9 @@ indir $tempdir, { # Copy it over rm_rf "book"; cp $tempdir.add("book"), "book", :r; + +if $upload { + my $rsync = run 'rsync', '-avzh', $tempdir.add("book").Str, + 'ubuntu@static.stranger.systems:/var/www/static.stranger.systems/idris-by-contrived-example'; + die "rsync went bad" unless $rsync; +}