From 02981fd3aeb7ed804ba0ce6e83281083070bcd5e Mon Sep 17 00:00:00 2001 From: haslersn Date: Mon, 13 Jul 2020 17:35:48 +0200 Subject: [PATCH] Take external programs from environment in order to support non FHS distros For instance, NixOS doesn't follow the FHS. --- Scripts/bmr-program-run-remote.sh | 2 +- Scripts/bmr-program-run.sh | 2 +- Scripts/brain.sh | 2 +- Scripts/build.sh | 2 +- Scripts/ccd.sh | 2 +- Scripts/chaigear.sh | 2 +- Scripts/cowgear.sh | 2 +- Scripts/fake-spdz-real-bmr.sh | 2 +- Scripts/generate-cert.sh | 2 +- Scripts/hemi.sh | 2 +- Scripts/mal-ccd.sh | 2 +- Scripts/mal-rep-bin.sh | 2 +- Scripts/mal-rep-bmr.sh | 2 +- Scripts/mal-rep-field.sh | 2 +- Scripts/mal-rep-ring.sh | 2 +- Scripts/mal-shamir-bmr.sh | 2 +- Scripts/mal-shamir.sh | 2 +- Scripts/mama.sh | 2 +- Scripts/mascot.sh | 2 +- Scripts/ps-rep-field.sh | 2 +- Scripts/ps-rep-ring.sh | 2 +- Scripts/real-bmr.sh | 2 +- Scripts/rep-bmr.sh | 2 +- Scripts/rep-field.sh | 2 +- Scripts/replicated.sh | 2 +- Scripts/ring.sh | 2 +- Scripts/run-online.sh | 2 +- Scripts/semi-bin.sh | 2 +- Scripts/semi.sh | 2 +- Scripts/semi2k.sh | 2 +- Scripts/setup-clients.sh | 2 +- Scripts/setup-online.sh | 2 +- Scripts/setup-ssl.sh | 2 +- Scripts/shamir-bmr.sh | 2 +- Scripts/shamir.sh | 2 +- Scripts/soho.sh | 2 +- Scripts/spdz2k.sh | 2 +- Scripts/test_ecdsa.sh | 2 +- Scripts/test_tutorial.sh | 2 +- Scripts/tinier.sh | 2 +- Scripts/tiny.sh | 2 +- Scripts/tldr.sh | 4 ++-- Scripts/yao.sh | 2 +- SimpleOT | 2 +- 44 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Scripts/bmr-program-run-remote.sh b/Scripts/bmr-program-run-remote.sh index bc9e683f..c8ac5c61 100755 --- a/Scripts/bmr-program-run-remote.sh +++ b/Scripts/bmr-program-run-remote.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash while getopts t: opt; do case $opt in diff --git a/Scripts/bmr-program-run.sh b/Scripts/bmr-program-run.sh index d48da5ea..0e803acf 100755 --- a/Scripts/bmr-program-run.sh +++ b/Scripts/bmr-program-run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash while getopts t: opt; do case $opt in diff --git a/Scripts/brain.sh b/Scripts/brain.sh index 50d19c32..7239b598 100755 --- a/Scripts/brain.sh +++ b/Scripts/brain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/build.sh b/Scripts/build.sh index 45404730..b8c32447 100755 --- a/Scripts/build.sh +++ b/Scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function build { diff --git a/Scripts/ccd.sh b/Scripts/ccd.sh index a3eef4b1..e911fb72 100755 --- a/Scripts/ccd.sh +++ b/Scripts/ccd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/chaigear.sh b/Scripts/chaigear.sh index 6c518eba..19b4eec3 100755 --- a/Scripts/chaigear.sh +++ b/Scripts/chaigear.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/cowgear.sh b/Scripts/cowgear.sh index d400cc10..54a256e6 100755 --- a/Scripts/cowgear.sh +++ b/Scripts/cowgear.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/fake-spdz-real-bmr.sh b/Scripts/fake-spdz-real-bmr.sh index bb3a21fe..11dc1a98 100755 --- a/Scripts/fake-spdz-real-bmr.sh +++ b/Scripts/fake-spdz-real-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/generate-cert.sh b/Scripts/generate-cert.sh index 13f05fcf..c30e7cf2 100755 --- a/Scripts/generate-cert.sh +++ b/Scripts/generate-cert.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash i=$1 diff --git a/Scripts/hemi.sh b/Scripts/hemi.sh index f0be05bf..4f449974 100755 --- a/Scripts/hemi.sh +++ b/Scripts/hemi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-ccd.sh b/Scripts/mal-ccd.sh index db3bf61e..f01d6d7d 100755 --- a/Scripts/mal-ccd.sh +++ b/Scripts/mal-ccd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-rep-bin.sh b/Scripts/mal-rep-bin.sh index 7beb385b..444fcc7f 100755 --- a/Scripts/mal-rep-bin.sh +++ b/Scripts/mal-rep-bin.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-rep-bmr.sh b/Scripts/mal-rep-bmr.sh index e36f2277..0a4cc245 100755 --- a/Scripts/mal-rep-bmr.sh +++ b/Scripts/mal-rep-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-rep-field.sh b/Scripts/mal-rep-field.sh index 7099f9cd..5a11b69f 100755 --- a/Scripts/mal-rep-field.sh +++ b/Scripts/mal-rep-field.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-rep-ring.sh b/Scripts/mal-rep-ring.sh index fb43157d..0bd84083 100755 --- a/Scripts/mal-rep-ring.sh +++ b/Scripts/mal-rep-ring.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-shamir-bmr.sh b/Scripts/mal-shamir-bmr.sh index 4f684a7b..5ca118a2 100755 --- a/Scripts/mal-shamir-bmr.sh +++ b/Scripts/mal-shamir-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mal-shamir.sh b/Scripts/mal-shamir.sh index 7b902fb9..1e48931b 100755 --- a/Scripts/mal-shamir.sh +++ b/Scripts/mal-shamir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mama.sh b/Scripts/mama.sh index c1eb3020..626eb296 100755 --- a/Scripts/mama.sh +++ b/Scripts/mama.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/mascot.sh b/Scripts/mascot.sh index 5564dbe8..da8e5b30 100755 --- a/Scripts/mascot.sh +++ b/Scripts/mascot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/ps-rep-field.sh b/Scripts/ps-rep-field.sh index a38cfb88..91c7081e 100755 --- a/Scripts/ps-rep-field.sh +++ b/Scripts/ps-rep-field.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/ps-rep-ring.sh b/Scripts/ps-rep-ring.sh index 8c696cc4..c6d5524f 100755 --- a/Scripts/ps-rep-ring.sh +++ b/Scripts/ps-rep-ring.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/real-bmr.sh b/Scripts/real-bmr.sh index 85790e37..d61b4c3f 100755 --- a/Scripts/real-bmr.sh +++ b/Scripts/real-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/rep-bmr.sh b/Scripts/rep-bmr.sh index f0c4a0ff..70165aa1 100755 --- a/Scripts/rep-bmr.sh +++ b/Scripts/rep-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/rep-field.sh b/Scripts/rep-field.sh index fd3eb6ef..a3593a56 100755 --- a/Scripts/rep-field.sh +++ b/Scripts/rep-field.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/replicated.sh b/Scripts/replicated.sh index 03f45a03..60d02cee 100755 --- a/Scripts/replicated.sh +++ b/Scripts/replicated.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/ring.sh b/Scripts/ring.sh index 0548f039..e31f7a3c 100755 --- a/Scripts/ring.sh +++ b/Scripts/ring.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/run-online.sh b/Scripts/run-online.sh index 6af69d4b..75513e17 100755 --- a/Scripts/run-online.sh +++ b/Scripts/run-online.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/semi-bin.sh b/Scripts/semi-bin.sh index d7c41e3c..b1cfe993 100755 --- a/Scripts/semi-bin.sh +++ b/Scripts/semi-bin.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/semi.sh b/Scripts/semi.sh index 0a663d09..4c5a5bc5 100755 --- a/Scripts/semi.sh +++ b/Scripts/semi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/semi2k.sh b/Scripts/semi2k.sh index 3fdd4f4a..28645b6a 100755 --- a/Scripts/semi2k.sh +++ b/Scripts/semi2k.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/setup-clients.sh b/Scripts/setup-clients.sh index 48a406f0..74010c26 100755 --- a/Scripts/setup-clients.sh +++ b/Scripts/setup-clients.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash n=$1 diff --git a/Scripts/setup-online.sh b/Scripts/setup-online.sh index b3176e64..48626fd8 100755 --- a/Scripts/setup-online.sh +++ b/Scripts/setup-online.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/setup-ssl.sh b/Scripts/setup-ssl.sh index 10a20b10..381fc2be 100755 --- a/Scripts/setup-ssl.sh +++ b/Scripts/setup-ssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # brew-installed OpenSSL on MacOS PATH=/usr/local/opt/openssl/bin:$PATH diff --git a/Scripts/shamir-bmr.sh b/Scripts/shamir-bmr.sh index c92d026c..eca89335 100755 --- a/Scripts/shamir-bmr.sh +++ b/Scripts/shamir-bmr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/shamir.sh b/Scripts/shamir.sh index 38e0aa30..e0510b6d 100755 --- a/Scripts/shamir.sh +++ b/Scripts/shamir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/soho.sh b/Scripts/soho.sh index 82bc9633..0369ef62 100755 --- a/Scripts/soho.sh +++ b/Scripts/soho.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/spdz2k.sh b/Scripts/spdz2k.sh index e579c3ea..3e91dd5f 100755 --- a/Scripts/spdz2k.sh +++ b/Scripts/spdz2k.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/test_ecdsa.sh b/Scripts/test_ecdsa.sh index f59243d3..c6315612 100755 --- a/Scripts/test_ecdsa.sh +++ b/Scripts/test_ecdsa.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash make -j4 ecdsa Fake-ECDSA.x secure.x diff --git a/Scripts/test_tutorial.sh b/Scripts/test_tutorial.sh index cbdd9255..1476863f 100755 --- a/Scripts/test_tutorial.sh +++ b/Scripts/test_tutorial.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash while getopts XYC opt; do case $opt in diff --git a/Scripts/tinier.sh b/Scripts/tinier.sh index 0244607d..5e097cd2 100755 --- a/Scripts/tinier.sh +++ b/Scripts/tinier.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/tiny.sh b/Scripts/tiny.sh index 4df971fa..626d3b4c 100755 --- a/Scripts/tiny.sh +++ b/Scripts/tiny.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HERE=$(cd `dirname $0`; pwd) SPDZROOT=$HERE/.. diff --git a/Scripts/tldr.sh b/Scripts/tldr.sh index 9dc2b27f..5dd4f45d 100755 --- a/Scripts/tldr.sh +++ b/Scripts/tldr.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh if test `uname` = "Linux"; then flags='cat /proc/cpuinfo' @@ -11,7 +11,7 @@ elif test `uname` = Darwin; then echo Aborting exit 1 else - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /usr/bin/env ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi fi make tldr diff --git a/Scripts/yao.sh b/Scripts/yao.sh index 72318805..31506505 100755 --- a/Scripts/yao.sh +++ b/Scripts/yao.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . Scripts/run-common.sh diff --git a/SimpleOT b/SimpleOT index 96f8a97e..84d73522 160000 --- a/SimpleOT +++ b/SimpleOT @@ -1 +1 @@ -Subproject commit 96f8a97e6c049e11059337fd33457d84cb730f4c +Subproject commit 84d73522619f90ba2aabce8d660baef1442aa26d