OILS / devtools / release-test.sh View on Github | oilshell.org

36 lines, 19 significant
1#!/usr/bin/env bash
2#
3# Test release tarballs
4#
5# Usage:
6# devtools/release-test.sh <function name>
7
8set -o nounset
9set -o pipefail
10set -o errexit
11shopt -s strict:all 2>/dev/null || true # dogfood for OSH
12
13fetch() {
14 local dir=$1
15 local tar_url=$2
16
17 wget --directory $dir --no-clobber $tar_url
18
19 pushd $dir
20 tar -x -v < $(basename $tar_url)
21 popd
22}
23
24fetch-2() {
25 fetch _tmp/release-test/github \
26 'http://travis-ci.oilshell.org/github-jobs/7098/cpp-tarball.wwz/_release/oils-for-unix.tar'
27
28 fetch _tmp/release-test/sourcehut \
29 'http://travis-ci.oilshell.org/srht-jobs/1236802/cpp-tarball.wwz/_release/oils-for-unix.tar'
30}
31
32diff-2() {
33 diff -u -r _tmp/release-test/{github,sourcehut}
34}
35
36"$@"