portability enhancement: use "#!/usr/bin/env <interpreter>" on all perl scripts and shell scripts that use bash extensions, and use "#!/bin/sh" on the rest.

pull/7886/head
Daniel Pouzzner 2024-08-20 13:48:33 -05:00
parent 4f4fb4bd0a
commit 1c68da282c
61 changed files with 65 additions and 64 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Assume we're in wolfssl/Docker
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "Running with \"${*}\"..."

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Assume we're in wolfssl/Docker/yocto
WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/../..; pwd)

View File

@ -35,7 +35,7 @@ press the reset button or power cycle the Arduino before making a connection.
Here's one possible script to test the server from a command-line client:
```bash
#!/bin/bash
#!/usr/bin/env bash
echo "client log " > client_log.txt
counter=1
THIS_ERR=0

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# testing script: compileAllExamples
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# testAll.sh [keyword suffix]
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Syntax:
# ./testMonitor.sh <example_name> <target> <keyword>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check if IDF_PATH is set
if [ -z "$IDF_PATH" ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -z $1 ]; then
echo "./build <Debug | Release>"
exit 1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
function usage(){
cat << _EOT_

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# genhexbuf.pl
# Copyright (C) 2020 wolfSSL Inc.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
SIGOPT=rsa_padding_mode:pss
SIGOPT2=rsa_pss_saltlen:-1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# build-wolfssl-framework.sh
#

View File

@ -1,8 +1,10 @@
#!/bin/bash -e
#!/usr/bin/env bash
# this scrypt deploy wolfssl and wolfcrypto source code to mynewt project
# this script deploys wolfssl and wolfcrypto source code to the mynewt project.
# run as bash "mynewt project root directory path"
set -e
SCRIPTDIR=`dirname $0`
SCRIPTDIR=`cd $SCRIPTDIR && pwd -P`
WOLFSSL_MYNEWTDIR=${SCRIPTDIR}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e # exit on any command failure
if [ ! -d wolfssl ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script creates symbolic links to the required asynchronous
# file for using the asynchronous simulator and make check

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# gencrls, crl config already done, see taoCerts.txt for setup
check_result(){

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# run from wolfssl root

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
check_result(){
if [ $1 -ne 0 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
EXAMPLE=$1
echo "This uses ed25519 certificate generator from wolfssl-examples github"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
check_result(){
if [ $1 -ne 0 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
###########################################################
########## update and sign server-revoked-key.pem ################

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
check_result(){
if [ $1 -ne 0 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# renewcerts.sh
#
# renews the following certs:

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
check_result(){
if [ $1 -ne 0 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
check_result(){
if [ $1 -ne 0 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# run from wolfssl root

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# assemble-chains.sh
# Create certs and assemble all the certificate CA path test cert chains.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
keyList=(
chainA-ICA1-key.pem chainA-entity-key.pem

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
generate() {
# read in certificate and alter the last part of the signature

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#commit-tests.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# This script depends on g++, cmake, git, and make to be installed
POSIXLY_CORRECT=1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# fips-check.sh
# This script checks the current revision of the code against the

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
if test ! -x ./wolfcrypt/test/testwolfcrypt
then
@ -18,4 +18,3 @@ then
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
sed "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c.bak >wolfcrypt/src/fips_test.c
fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# gencertbuf.pl
# version 1.1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
SRC=vagrant
DST=wolfssl

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# aria_cmake_build_test.sh
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script is designed to compare the output of wolfcrypt/benchmark test
# application. If the file has an extension ".csv", then it will parse the
# comma separated format, otherwise it will use the standard output format. The

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#crl.test
# if we can, isolate the network namespace to eliminate port collisions.

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# dertoc.pl
# version 1.0

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script can be run with several environment variables set dictating its
# run. You can set the following to what you like:

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# dtlscid.test
# Copyright wolfSSL 2022-2024

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# external.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# google.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#set -v
# Script to produce a small source/header only package (with CMake support)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run this script from the wolfSSL root as `./scripts/memtest.sh`.
@ -14,7 +14,7 @@ make
for i in {1..1000}
do
echo "Trying $i...\n"
echo -e "Trying ${i}...\n"
./tests/unit.test > ./scripts/memtest.txt 2>&1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# ocsp-stapling-with-ca-as-responder.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# ocsp-stapling.test
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# ocsp-stapling2.test
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# openssl.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test WolfSSL/OpenSSL srtp interoperability
#
# TODO: add OpenSSL client with WolfSSL server

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# pem.test
# Copyright wolfSSL 2023-2023

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# ping.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#pkcallbacks.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# psk.test
# copyright wolfSSL 2016

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#resume.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#set -x
# Run this script from the wolfSSL root

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#sniffer-testsuite.test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
WOLF_ROOT=$(eval "pwd")
echo "WOLF_ROOT set to: \"$WOLF_ROOT\""
cd ../ || exit 5

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# tls13.test
# Copyright wolfSSL 2016-2021

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# trusted_peer.test
# copyright wolfSSL 2016