1#!/bin/bash 2 3# 4# This script simulates a user creating a new project that depends 5# on github.com/ooni/probe-engine@GITHUB_SHA. 6# 7 8set -ex 9mkdir -p /tmp/example.org/x 10cd /tmp/example.org/x 11go mod init example.org/x 12cat > main.go << EOF 13package main 14 15import "github.com/ooni/probe-engine/libminiooni" 16 17func main() { 18 libminiooni.Main() 19} 20EOF 21go get -v github.com/ooni/probe-engine@$GITHUB_SHA 22go build -v . 23./x --yes -OTunnel=psiphon -ni https://www.example.com urlgetter 24