Add upload option to build-book script
This commit is contained in:
parent
4683cd72b9
commit
32a8c6bd43
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue