OILS / devtools / release.sh View on Github | oils.pub

831 lines, 392 significant
1#!/usr/bin/env bash
2#
3# The big Oils release process.
4#
5# Usage:
6# devtools/release.sh <function name>
7#
8# Steps:
9# edit oils-version.txt, build/doc.sh update-src-versions, and
10# bump devtools/release-note.sh
11# $0 make-release-branch
12# $0 two-tarballs # CPython, then oils-for-unix, which is INSTALLED
13# demo/osh-debug.sh osh-for-release: Start a shell to dogfood
14#
15# Run on each machine:
16# $0 auto-machine1
17# $0 auto-machine2 ($0 dep-benchmarks first)
18#
19# In between:
20# [switch benchmarks-data repo] commit src/oils-for-unix-* and push to flanders.
21# TODO: Make sure benchmark-data directory is clean!
22#
23# Resume manual work
24#
25# Commit files to oils-for-unix/benchmark-data repo and sync.
26# benchmarks/report.sh all
27# $0 deploy-tar # needed to publish tarball checksum in HTML
28# build/doc.sh run-for-release
29# $0 compress
30# devtools/release-version.sh git-changelog-$VERSION
31# devtools/release-version.sh announcement-$VERSION
32# MAYBE: ./local.sh test-release-tree if you want to preview it
33# $0 deploy-doc (makes releases.html)
34#
35# demo/osh-debug.sh analyze # see what you ran
36#
37# - Go to oils.pub repo and do:
38# ./deploy.sh site # copy release
39# ./deploy.sh bump-index-version
40# make
41# ./deploy.sh site # copy new index
42# ./deploy.sh bump-release-version
43# - Go to oils.pub__deploy and "git add release/$VERSION".
44# - git commit -a
45
46set -o nounset
47set -o pipefail
48set -o errexit
49
50shopt -s strict:all 2>/dev/null || true # dogfood for OSH
51
52REPO_ROOT=$(cd $(dirname $0)/.. ; pwd)
53OIL_VERSION=$(head -n 1 oils-version.txt)
54
55source devtools/common.sh # banner
56source benchmarks/common.sh # BENCHMARK_DATA_OILS, OSH_CPP_BENCHMARK_DATA
57 # redefines OIL_VERSION as readonly
58
59readonly OSH_RELEASE_BINARY=$REPO_ROOT/_tmp/oils-ref-tar-test/oils-ref-$OIL_VERSION/_bin/osh
60readonly YSH_RELEASE_BINARY=$REPO_ROOT/_tmp/oils-ref-tar-test/oils-ref-$OIL_VERSION/_bin/ysh
61
62log() {
63 echo "$@" 1>&2
64}
65
66make-release-branch() {
67 git checkout master
68 local name=release/$OIL_VERSION
69 git checkout -b $name
70 git push -u origin $name
71}
72
73ensure-smooth-build() {
74 # Stray files can mess up the unit tests
75 devtools/git.sh error-if-untracked
76
77 build/clean.sh
78
79 sudo -k; sudo true # clear and re-cache credentials
80
81 # Install with root privileges
82 _install
83}
84
85# For redoing a release. This is everything until you have to 'git pull' the
86# benchmark-data repo to make reports.
87#
88# PRECONDITION: $0 two-tarballs was run manually, which runs
89# ensure-smooth-build.
90auto-machine1() {
91 local resume=${1:-} # workaround for spec test flakiness bug
92 local resume2=${2:-} # skip past spec sanity check
93 local resume3=${3:-} # skip past metrics and wild tests
94 local resume4=${4:-} # skip past full spec tests
95
96 if test -z "$resume"; then
97 $0 build-and-test
98 fi
99
100 if test -z "$resume2"; then
101 _spec-sanity-check # just run a few spec tests
102 fi
103
104 if test -z "$resume3"; then
105 $0 metrics # this can catch bugs
106 test/wild.sh all
107 fi
108
109 if test -z "$resume4"; then
110 $0 spec-all # full spec test run
111 fi
112
113 $0 benchmark-run do_machine1
114}
115
116# Note: needs dep-benchmarks to run
117auto-machine2() {
118 ensure-smooth-build
119
120 # Note: this can't be done until we sync the oils-for-unix source from
121 # machine 1.
122 $0 benchmark-build
123 $0 benchmark-run
124}
125
126# TODO:
127# - enforce that there is a release/$VERSION branch?
128
129# oils.pub__deploy/
130# releases.html
131# release/
132# $VERSION/
133# index.html # release page, from doc/release-index.md
134# oils-version.txt
135# release-date.txt
136# announcement.html # HTML redirect
137# changelog.html
138# doc/
139# index.html
140# ...
141# test/ # results
142# spec.wwz/
143# machine-lisa/
144# wild.wwz/
145# unit.wwz/
146# other.wwz/
147# gold.txt
148# parse-errors.txt
149# runtime-errors.txt
150# tools-deps.txt
151# osh-usage.txt
152# lossless.txt
153# tarball/ # log of building and running the tarball?
154# asan/ # spec tests or other?
155# # or it can be put under test/{spec,wild}
156# metrics.wwz/ # static metrics on source code?
157# line-counts/
158# nativedeps.txt (build/stats.sh line counts)
159# bytecode size, number of PyCodeObject
160# number of functions, classes, etc.?
161# bytecode/bundle size (binary size on x86_64 is in ovm-build.sh)
162# tarball size?
163# coverage.wwz/
164# unified/ # clang-coverage
165# benchmarks.wwz/
166# compute
167# osh-parser/
168# osh-runtime/
169# vm-baseline/
170# ...
171# startup/
172# download/ # What about native binaries?
173# 0.0.0/
174# oils-ref-0.0.0.tar.xz
175
176_test-tarball() {
177 local name=${1:-hello}
178 local version=${2:-0.0.0}
179 local install=${3:-}
180
181 local tmp=_tmp/${name}-tar-test
182 rm -r -f $tmp
183 mkdir -p $tmp
184
185 pushd $tmp
186 tar --extract -z < ../../_release/$name-$version.tar.gz
187
188 cd $name-$version
189 ./configure
190
191 # Build the fast one for a test.
192 # TODO: Maybe edit the Makefile to change the top target.
193 local bin=_bin/${name}.ovm # not dbg
194 time make $bin
195 $bin --version
196
197 if test -n "$install"; then
198 sudo ./install
199 fi
200 popd
201}
202
203test-oils-ref-tar() {
204 local install=${1:-} # non-empty to install
205 _test-tarball oils-ref $(head -n 1 oils-version.txt) "$install"
206}
207
208_release-build() {
209 # NOTE: deps/from-tar.sh {configure,build}-python is assumed
210
211 # Build the oils-ref tar
212 $0 oils-ref
213
214 test-oils-ref-tar
215
216 # For _spec-sanity-check
217 ln -s -f --no-target-directory -v oils-ref.ovm $OSH_RELEASE_BINARY
218 ln -s -f --no-target-directory -v oils-ref.ovm $YSH_RELEASE_BINARY
219}
220
221readonly HAVE_ROOT=1
222
223readonly -a MORE_TESTS=(
224 process-table
225 gold
226 ysh-ify
227 parse-errors runtime-errors
228 ysh-runtime-errors
229 ysh-parse-errors
230 ysh-every-string
231 lossless
232 osh-usage tools-deps
233 syscall
234)
235# TODO: Unify with CI, and clean up
236# doc/error-catalog.sh
237# data_lang/j8-errors.sh
238# ysh/run.sh
239
240run-more-tests() {
241 for name in "${MORE_TESTS[@]}"; do
242 case $name in
243 gold)
244 if test -n "${OILS_HIJACK_SHEBANG:-}"; then
245 cat >&2 <<'EOF'
246=====
247WARNING: Skipping gold tests because $OILS_HIJACK_SHEBANG is set.'
248Run them manually with:
249
250 test/gold.sh run-for-release
251=====
252EOF
253 continue
254 fi
255 ;;
256 *)
257 banner "Test suite: $name"
258 ;;
259 esac
260
261 test/$name.sh run-for-release
262 done
263
264 ysh/run.sh run-for-release
265
266 data_lang/j8-errors.sh run-for-release
267}
268
269_spec-sanity-check() {
270 # Quick early test for _bin/osh and _bin/ysh
271
272 # TODO: Use --ovm-bin-dir
273 # Note: MAX_PROCS=1 prevents [#oil-dev > Random Spec Test Stoppages]
274 # Still need to fix that bug
275 MAX_PROCS=1 NUM_SPEC_TASKS=2 OSH_LIST="$OSH_RELEASE_BINARY" test/spec-py.sh osh-all
276 MAX_PROCS=1 NUM_SPEC_TASKS=2 YSH_LIST="$YSH_RELEASE_BINARY" test/spec-py.sh ysh-all
277}
278
279spec-all() {
280 ### Run all spec tests
281
282 test/stateful.sh soil-run # Same as CI
283
284 # Create the tests we're running
285 test/smoosh.sh make-spec
286
287 # TODO: Use --ovm-bin-dir
288 export OSH_LIST="$REPO_ROOT/bin/osh $OSH_RELEASE_BINARY"
289 export YSH_LIST="$REPO_ROOT/bin/ysh $YSH_RELEASE_BINARY"
290 test/spec-py.sh all-and-smoosh
291
292 # Build $OSH_CPP_BENCHMARK_DATA
293 _build-oils-benchmark-data
294
295 # TODO: Use --oils-cpp-bin-dir
296 # Collect and publish stats about the C++ translation.
297 OSH_CC="$OSH_CPP_BENCHMARK_DATA" test/spec-cpp.sh osh-all
298 YSH_CC="$YSH_CPP_BENCHMARK_DATA" test/spec-cpp.sh ysh-all
299}
300
301spec-cpp() {
302 ### For repair
303
304 # TODO: Use --oils-cpp-bin-dir
305
306 # Quick
307 # NUM_SPEC_TASKS=2 OSH_CC="$OSH_CPP_BENCHMARK_DATA" test/spec-cpp.sh all
308 OSH_CC="$OSH_CPP_BENCHMARK_DATA" test/spec-cpp.sh all
309}
310
311# For quickly debugging failures that don't happen in dev mode.
312spec-one() {
313 export OSH_LIST="$REPO_ROOT/bin/osh $OSH_RELEASE_BINARY"
314 export YSH_LIST="$REPO_ROOT/bin/ysh $YSH_RELEASE_BINARY"
315 test/spec.sh "$@"
316}
317
318build-and-test() {
319 ### Build tarballs and test them. And preliminaries like unit tests.
320
321 # TODO: Log this whole thing? Include logs with the /release/ page?
322
323 # Before doing anything
324 test/lint.sh soil-run
325
326 test/unit.sh run-for-release # Python unit tests
327
328 test/coverage.sh run-for-release # C++ unit tests
329
330 # App bundle
331 _release-build
332
333 # TODO: test oils-for-unix in Alpine chroot too.
334 # NOTE: Need test/alpine.sh download;extract;setup-dns,add-oil-build-deps,
335 # etc.
336 if test -n "$HAVE_ROOT"; then
337 # TODO: Factor out test/alpine.sh to test/chroot.sh
338 test/alpine.sh copy-tar '' oils-ref
339 test/alpine.sh test-tar '' oils-ref
340 fi
341
342 test/spec.sh smoke # Initial smoke test, slightly redundant.
343
344 run-more-tests
345}
346
347_install() {
348 test/spec-bin.sh install-shells-with-apt
349
350 # A subset of build/py.sh ubuntu-deps. (Do we need build-essential?)
351 #sudo apt install python-dev
352}
353
354_build-oils-benchmark-data() {
355 pushd $BENCHMARK_DATA_OILS
356 ./configure
357 for variant in dbg opt; do
358 # DWARF version 4 is a hack for bloaty, which doesn't support version 5.
359 # I don't think this should affect benchmarks besides
360 # metrics/native-code.sh, so we don't bother building a separate binary.
361 # The Soil CI runs without this flag.
362 CXXFLAGS=-gdwarf-4 _build/oils.sh --variant "$variant" --skip-rebuild
363 done
364 popd
365}
366
367benchmark-build() {
368 ### Build function on machine 2.
369
370 build/clean.sh
371 if test -n "$HAVE_ROOT"; then
372 _install
373 fi
374
375 build/py.sh all # runs configure-for-dev
376 configure-for-release
377
378 _release-build
379}
380
381# Run benchmarks with the binary built out of the tarball.
382benchmark-run() {
383 local do_machine1=${1:-}
384
385 _build-oils-benchmark-data
386 OSH_OVM=$OSH_RELEASE_BINARY benchmarks/auto.sh all "$do_machine1"
387}
388
389_compressed-tarball() {
390 local name=${1:-hello}
391 local version=${2:-0.0.0}
392
393 local in=_release/$name.tar
394 local out=_release/$name-$version.tar.gz
395
396 # Overwrite it to cause rebuild of oils-ref.tar
397 build/stamp.sh write-release-date
398
399 #make -d -r $in # To debug
400 make $in
401
402 time gzip -c $in > $out
403 ls -l $out
404}
405
406oils-ref() {
407 # Note: this is redundant with py-tarball, which we probably don't need
408 # anymore. It was for the obsolete build/cpython-defs.
409 _compressed-tarball oils-ref $OIL_VERSION
410}
411
412hello() {
413 _compressed-tarball hello $(head -n 1 build/testdata/hello-version.txt)
414}
415
416
417_link() {
418 ln -s -f -v --no-target-directory "$@"
419}
420
421compress() {
422 local root=$PWD/_release/VERSION/
423
424 log '--- more-tests'
425 local out="$root/more-tests.wwz"
426 pushd _tmp
427 time zip -r -q $out suite-logs unit syscall process-table
428 popd
429
430 # This has HTML reports, .profraw files, and logs of stdout, e.g.
431 # mycpp-unit/gc_heap_test.log
432 # About 1.5 MB
433 log "--- coverage"
434 local out="$root/test/coverage.wwz"
435 pushd _test/clang-coverage
436 # This also saves the logs
437 time zip -r -q $out .
438 popd
439
440 log "--- test/spec"
441 local out="$root/test/spec.wwz"
442 pushd _tmp/spec
443 time zip -r -q $out . # recursive, quiet
444 popd
445
446 log "--- test/wild"
447 local out="$root/test/wild.wwz"
448 pushd _tmp/wild-www
449 time zip -r -q $out . # recursive, quiet
450 popd
451
452 # NOTE: must be /pub/metrics.wwz so that relative URLs like
453 # ../../../web/line-counts.css work. The Soil UI also relies on such
454 # relative URLs.
455 log "--- metrics"
456 local out="$root/pub/metrics.wwz"
457 pushd _tmp/metrics
458 time zip -r -q $out . # recursive, quiet
459 popd
460
461 # Ditto: pub/src-tree.wwz lines up with URLs in Soil
462 log "--- src-tree"
463 local out="$root/pub/src-tree.wwz"
464 pushd _tmp/src-tree-www
465 time zip -r -q $out . # recursive, quiet
466 popd
467
468 compress-benchmarks
469
470 tree _release/VERSION
471}
472
473compress-benchmarks() {
474 local root=$PWD/_release/VERSION/
475 mkdir -p $root
476
477 log "--- benchmarks"
478
479 local out="$root/benchmarks.wwz"
480
481 # - For benchmarks that run on multiple machines, technically we only need
482 # index.html, but include stage1 and stage2.
483 # - For those that run on single machines, we also archive the raw/ dir.
484 # - Although benchmarks/compute is saved in oilshell/benchmark-data
485 # - Note: _tmp/uftrace/{raw,stage1} are big (hundreds of MB), so leave them
486 # out
487
488 pushd _tmp
489 find \
490 osh-parser/{stage1,stage2,index.html} \
491 osh-runtime/{stage1,stage2,index.html} \
492 vm-baseline/{stage1,stage2,index.html} \
493 ovm-build/{stage1,stage2,index.html} \
494 compute/{raw,stage1,stage2,index.html} \
495 gc/{raw,stage2,index.html} \
496 gc-cachegrind/{raw,stage2,index.html} \
497 mycpp-examples/{raw,stage2,index.html} \
498 uftrace/{stage2,index.html} \
499 -type f \
500 | xargs --verbose -- zip -q $out
501 popd
502}
503
504line-counts() {
505 local out_dir=$1 # should be an absolute path
506 mkdir -p $out_dir
507
508 # Counting directly from the build.
509 metrics/tarball.sh linecount-pydeps > $out_dir/pydeps.txt
510 metrics/tarball.sh linecount-nativedeps > $out_dir/nativedeps.txt
511 metrics/tarball.sh linecount-oils-cpp > $out_dir/oils-cpp.txt
512
513 metrics/source-code.sh write-reports $out_dir # for-translation and overview
514 metrics/source-code.sh cloc-report > $out_dir/cloc-report.txt
515
516 # goes to _tmp/metrics/preprocessed
517 metrics/source-code.sh preprocessed
518}
519
520metrics() {
521 local out=_tmp/metrics
522 mkdir -p $out
523
524 line-counts $PWD/$out/line-counts
525
526 # For another .wwz file
527 doctools/src-tree.sh soil-run
528
529 metrics/bytecode.sh run-for-release
530 metrics/native-code.sh run-for-release
531 # Disabled 2024-12
532 # build/cpython-defs.sh run-for-release
533
534 tree $out
535}
536
537deploy-doc() {
538 local deploy_repo='../oils.pub__deploy'
539 local release_root_dir="$deploy_repo/release"
540 local release_dir="$release_root_dir/$OIL_VERSION"
541
542 mkdir -p $release_dir
543 cp -v -r --force --no-target-directory \
544 _release/VERSION/ $release_dir/
545
546 # Generate release index.
547 html-index $release_root_dir _tmp/releases.html
548 cp -v _tmp/releases.html $deploy_repo
549
550 tree -L 3 $release_root_dir
551
552 ls -l $deploy_repo/releases.html
553}
554
555readonly DOWNLOAD_DIR='../oils.pub__deploy/download/'
556
557# Generating releases.html requires the old tarballs!
558sync-old-tar() {
559 local user=$1 # required username
560 rsync --archive --verbose \
561 $user@oilshell.org:oilshell.org/download/ $DOWNLOAD_DIR
562}
563
564# I think these aren't checked into git? They can just be managed separately?
565# Or should you check in the sha checksums? Those will be in releases.html,
566# but a CSV might be nice.
567deploy-tar() {
568 mkdir -p $DOWNLOAD_DIR
569
570 cp -v \
571 _release/oils-ref-$OIL_VERSION.tar.* _release/oils-for-unix-$OIL_VERSION.tar.* \
572 $DOWNLOAD_DIR
573
574 ls -l $DOWNLOAD_DIR
575}
576
577#
578# Generate releases.html.
579#
580
581# Examples of similar release HTML pages:
582# - https://golang.org/dl/ - "Older versions", sha1 / sha256.
583# - Python has all point releases in chronological order, and then a separate
584# page for each changelog. There is too much boilerplate maybe?
585# - It has release notes before the downloads. Not sure I like that.
586# - node.js: https://nodejs.org/en/
587# - user agent detection for the right binary -- meh I don't want that
588# - Ruby: https://www.ruby-lang.org/en/downloads/releases/
589# - https://www.lua.org/download.html
590
591# Columns: Date / Version / Docs / / Files
592# Changelog .xz
593# Install
594# Docs/
595#
596# The files could be a separate page and separate table? I could provide
597# pre-built versions eventually? Linux static versions?
598
599# TODO: Each of these would be a good candidate for a data frame! Data vs.
600# presentation.
601
602# Simple UI:
603# - home page shows latest version (source release for now, binary release later?)
604# - link to Changelog, INSTALL, doc index
605# - or see all releases
606# - Grey out older releases?
607
608# TODO: Should be sorted by date? How to do that, with bash array? Or Awk?
609# $timestamp $version $timestamp file? And then sort -n I guess? Change
610# the release date format. It will use Unix timestamp (OK until 2038!)
611
612_html-index() {
613 local release_root_dir=$1 # the directory we want to make an index of
614
615 for entry in $release_root_dir/*; do
616 if ! test -d $entry; then
617 continue
618 fi
619 local dir=$entry
620
621 local version
622 version=$(head -n 1 $dir/oils-version.txt)
623 local release_date
624 release_date=$(head -n 1 $dir/release-date.txt)
625
626 log "-- $dir"
627 log "Version: $version"
628 log "Release Date: $release_date"
629 log ""
630
631 echo "$release_date $version"
632 done > _tmp/release-meta.txt
633
634 # Reverse sort by release date
635 sort -r _tmp/release-meta.txt > _tmp/sorted-releases.txt
636
637 while read date _ version; do
638 log "Release Date: $date"
639 log "Version: $version"
640
641 # anchor
642 cat <<EOF
643<tr>
644 <td>
645 <span class="date">$date</span>
646 </td>
647 <td>
648 <a name="$version"></a>
649 <span class="version-number">$version</span>
650 </td>
651 <td>
652 <p> <a href="release/$version/announcement.html">Announcement</a>
653 &nbsp; | &nbsp; <a href="release/$version/">Docs and Details</a>
654 </p>
655 </td>
656</tr>
657EOF
658
659 build/doc.sh tarball-links-row-html $version
660
661 cat <<EOF
662<tr>
663 <td colspan="3">
664 <div style="padding: 1em;" >
665 </div>
666 </td>
667</tr>
668
669EOF
670
671 done < _tmp/sorted-releases.txt
672}
673
674_releases-html-header() {
675 # TODO: use html-head here, and publish web/*.css somewhere outside of
676 # /release/$VERSION/? The list of all releases isn't versioned for obvious
677 # reasons. Other docs are in the oilshell.org repo using the all-2020.css
678 # bundle.
679
680 cat <<EOF
681<!DOCTYPE html>
682<html>
683 <head>
684 <meta name="viewport" content="width=device-width, initial-scale=1">
685 <title>Oils Releases</title>
686 <style>
687EOF
688
689 cat web/base.css
690 cat web/release-index.css
691
692cat <<EOF
693 h1 {
694 text-align: center;
695 }
696 </style>
697 </head>
698 <body class="width50">
699 <p id="home-link">
700 <a href="/">oils.pub</a>
701 </p>
702 <h1>Oils Releases</h1>
703
704 <table class="release-table">
705EOF
706}
707
708html-index() {
709 local release_root_dir=$1
710 local out=${2:-_tmp/releases.html}
711
712 { _releases-html-header
713 _html-index $release_root_dir
714
715 cat <<EOF
716 </table>
717 </body>
718</html>
719EOF
720
721 } > $out
722
723 ls -l $out
724}
725
726# For quickly iterating on tarball size reductions.
727tarball-size() {
728 make clean-repo
729 make _bin/oils-ref.ovm-dbg # faster way to build bytecode
730 oils-ref # make tarball
731 test-oils-ref-tar # Ctrl-C this, then run metrics/tarball.sh
732}
733
734dep-smoosh() {
735 local repo=~/git/languages/smoosh
736 if ! test -d $repo; then
737 local base_dir=$(dirname $repo)
738 mkdir -p $base_dir
739 pushd $base_dir
740 git clone git@github.com:mgree/smoosh.git
741 popd
742 fi
743}
744
745dep-benchmarks() {
746 ### Before auto-machine2
747
748 # 2023-07: Also need deps/from-tar.sh {configure,build}-cpython
749
750 benchmarks/osh-runtime.sh download
751 benchmarks/osh-runtime.sh extract
752
753 benchmarks/ovm-build.sh download
754 benchmarks/ovm-build.sh extract-other
755
756 # For ovm-build benchmark.
757 deps/from-binary.sh download-clang
758 deps/from-binary.sh extract-clang
759}
760
761more-release-deps() {
762 # List of deps that are NOT in soil/worker.sh here
763 # https://github.com/oilshell/oil/issues/926
764
765 # TODO: Make a container image for these.
766 if false; then
767 # TODO: Did this manually
768 # test/alpine.sh
769 # dep-alpine
770
771 # test/smoosh.sh
772 dep-smoosh
773
774 dep-benchmarks
775 fi
776}
777
778py-tarball() {
779 local in=_release/oils-ref.tar
780 local out=_release/oils-ref-$OIL_VERSION.tar.gz
781
782 make $in
783 time gzip -c $in > $out
784 ls -l $out
785
786 test-oils-ref-tar
787}
788
789native-tarball() {
790 # oils-for-unix
791 devtools/release-native.sh make-tar
792 # Also install as root
793 devtools/release-native.sh extract-for-benchmarks INSTALL
794}
795
796configure-for-release() {
797 # Run the slower configure, not configure-for-dev
798 ./configure
799}
800
801two-tarballs() {
802 ### First step of release. Assume that CI passes
803
804 ensure-smooth-build
805
806 build/py.sh all # runs ./configure-for-dev
807 configure-for-release
808
809 # "Base state" for repo scripts
810 ./NINJA-config.sh
811
812 py-tarball
813
814 native-tarball
815}
816
817upload-tmp() {
818 local tarball=$1
819 local user=$2
820
821 scp $tarball $user@oilshell.org:tmp/
822}
823
824sync-tmp() {
825 local user=$1
826 local dest=${2:-_tmp/candidates}
827 mkdir -p $dest
828 rsync --archive --verbose $user@oilshell.org:tmp/ $dest
829}
830
831"$@"