diff --git a/LibOS/shim/test/apps/apache/benchmark-ab.sh b/LibOS/shim/test/apps/apache/benchmark-ab.sh index 0334b0fc51..d7231e1837 100755 --- a/LibOS/shim/test/apps/apache/benchmark-ab.sh +++ b/LibOS/shim/test/apps/apache/benchmark-ab.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash PROTOCOL=${PROTOCOL:=http} declare -A THROUGHPUTS diff --git a/LibOS/shim/test/apps/bash/bash_test.sh b/LibOS/shim/test/apps/bash/bash_test.sh index 2086f872f0..1d367f347e 100755 --- a/LibOS/shim/test/apps/bash/bash_test.sh +++ b/LibOS/shim/test/apps/bash/bash_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash times=$1 [ $times -gt 0 2> /dev/null ] || times=300 diff --git a/LibOS/shim/test/apps/bash/tst.sh b/LibOS/shim/test/apps/bash/tst.sh index 0bcef5fca5..87cc29c1a6 100755 --- a/LibOS/shim/test/apps/bash/tst.sh +++ b/LibOS/shim/test/apps/bash/tst.sh @@ -1,4 +1,5 @@ -#! /bin/sh +#!/usr/bin/env bash + ############################################################################### # The BYTE UNIX Benchmarks - Release 3 # Module: tst.sh SID: 3.4 5/15/91 19:30:24 diff --git a/LibOS/shim/test/apps/bash/unixbench.sh b/LibOS/shim/test/apps/bash/unixbench.sh index 226919c7be..fa8a03600c 100755 --- a/LibOS/shim/test/apps/bash/unixbench.sh +++ b/LibOS/shim/test/apps/bash/unixbench.sh @@ -1,4 +1,5 @@ -#! /bin/bash +#!/usr/bin/env bash + ############################################################################### # The BYTE UNIX Benchmarks - Release 3 # Module: multi.sh SID: 3.4 5/15/91 19:30:24 diff --git a/LibOS/shim/test/apps/lighttpd/benchmark-http.sh b/LibOS/shim/test/apps/lighttpd/benchmark-http.sh index 4d71da7645..a4b3e1dd21 100755 --- a/LibOS/shim/test/apps/lighttpd/benchmark-http.sh +++ b/LibOS/shim/test/apps/lighttpd/benchmark-http.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## On Ubuntu, this script requires apache2-utils for the ab binary. # Run like: ./benchmark-http.sh server diff --git a/LibOS/shim/test/apps/ltp/syscalls.sh b/LibOS/shim/test/apps/ltp/syscalls.sh index 9527177bd6..0741d43f79 100755 --- a/LibOS/shim/test/apps/ltp/syscalls.sh +++ b/LibOS/shim/test/apps/ltp/syscalls.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/usr/bin/env bash + cd `dirname $0` export LTPROOT=$PWD"/opt/ltp" awk -v SGX=$SGX_RUN -f edit_sys_tests.awk $LTPROOT/runtest/syscalls > syscalls.graphene diff --git a/LibOS/shim/test/apps/python/web-test.sh b/LibOS/shim/test/apps/python/web-test.sh index b79314fb59..661fbc079d 100755 --- a/LibOS/shim/test/apps/python/web-test.sh +++ b/LibOS/shim/test/apps/python/web-test.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ## We really need to pick a unique ephemeral port; start by just picking pid+1024 PORT=$(($$ + 1024)) diff --git a/Pal/ipc/linux/install.sh b/Pal/ipc/linux/install.sh index 26c051c5bd..eeb1ca4d41 100755 --- a/Pal/ipc/linux/install.sh +++ b/Pal/ipc/linux/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT=`readlink -f "${BASH_SOURCE[0]}"` DIR=`dirname $SCRIPT` diff --git a/Pal/ipc/linux/load.sh b/Pal/ipc/linux/load.sh index 54445e632d..dd277191ad 100755 --- a/Pal/ipc/linux/load.sh +++ b/Pal/ipc/linux/load.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash MOD=graphene-ipc MODNAME=graphene_ipc diff --git a/Pal/ipc/linux/uninstall.sh b/Pal/ipc/linux/uninstall.sh index e15a7b58b3..9452c3bb5d 100755 --- a/Pal/ipc/linux/uninstall.sh +++ b/Pal/ipc/linux/uninstall.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash DIR=`readlink -f "${BASH_SOURCE[0]}"` MOD=graphene-ipc diff --git a/Runtime/pal_loader b/Runtime/pal_loader index 1502232560..96471fdef0 100755 --- a/Runtime/pal_loader +++ b/Runtime/pal_loader @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ "$1" == "SGX" ]; then if [ "$SGX" != "0" ]; then diff --git a/Scripts/list-all-graphene.sh b/Scripts/list-all-graphene.sh index 88f1f15bb0..0b222a7c45 100755 --- a/Scripts/list-all-graphene.sh +++ b/Scripts/list-all-graphene.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ID=`id -u` PGIDS=`ps -a -o pgid,command | tail -n +2 | \ diff --git a/Tools/gsce b/Tools/gsce index 3a5e0ff396..7f407be1ce 100755 --- a/Tools/gsce +++ b/Tools/gsce @@ -83,7 +83,7 @@ def gen_app_executor(app_name, bin_cmd, proj_dir) : print "e_path: " + e_path ef = open(e_path, "w") make_exec(e_path) - ef.write('#!/bin/bash \n \n') + ef.write('#!/usr/bin/env bash\n\n') ef.write('cd ' + proj_dir + '/LibOS/shim/test/apps/' + app_name +'\n') ef.write('# Generate EINITOKEN \n') ef.write(proj_dir + '/Pal/src/host/Linux-SGX/signer/pal-sgx-get-token -output '