Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "/usr/bin/env" in shebangs #685

Merged
merged 4 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ _Infrastructure:_
- Optimized dependencies of `libthemis` DEB and RPM packages ([#682](https://github.com/cossacklabs/themis/pull/682)).
- AndroidThemis is now available on JCenter ([#679](https://github.com/cossacklabs/themis/pull/679)).
- `make deb` and `make rpm` with `ENGINE=boringssl` will now produce `libthemis-boringssl` packages with embedded BoringSSL ([#683](https://github.com/cossacklabs/themis/pull/683)).
- Build system and tests now respect the `PATH` settings ([#685](https://github.com/cossacklabs/themis/pull/685)).

## [0.13.0](https://github.com/cossacklabs/themis/releases/tag/0.13.0), July 8th 2020

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
.DEFAULT_GOAL := all

# Set shell for target commands
SHELL = /bin/bash
SHELL = bash

# Disable built-in rules
MAKEFLAGS += --no-builtin-rules
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
#
# Configure Themis build.
#
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Themis-server/python/smessage_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import httplib, urllib
from pythemis import smessage
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Themis-server/python/ssession_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

import httplib, urllib
from pythemis import ssession
Expand Down
4 changes: 3 additions & 1 deletion scripts/phpthemis_postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash -e
#!/usr/bin/env bash
#
# Copyright (c) 2017 Cossack Labs Limited
#
Expand All @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

CONFCONT="extension=phpthemis.so"
SEARCH="Scan this dir for additional .ini files => "
PHPCONFD=`php -i | grep "$SEARCH" | sed "s/$SEARCH//"`;
Expand Down
4 changes: 3 additions & 1 deletion scripts/phpthemis_preuninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash -e
#!/usr/bin/env bash
#
# Copyright (c) 2017 Cossack Labs Limited
#
Expand All @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

CONFCONT="extension=phpthemis.so"
SEARCH="Scan this dir for additional .ini files => "
PHPCONFD=`php -i | grep "$SEARCH" | sed "s/$SEARCH//"`;
Expand Down
2 changes: 1 addition & 1 deletion scripts/pp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2017 Cossack Labs Limited
#
Expand Down
2 changes: 1 addition & 1 deletion src/wrappers/themis/rust/libthemis-sys/bindgen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Generate "src/lib.rs" file with bindings
#
Expand Down
4 changes: 3 additions & 1 deletion tests/_integration/base.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

# import functions
. tests/_integration/utils.sh
Expand Down
4 changes: 3 additions & 1 deletion tests/_integration/decrypt_folder.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

TEST_IN=$1

Expand Down
4 changes: 3 additions & 1 deletion tests/_integration/encrypt_folder.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

HOST_NAME=$1

Expand Down
8 changes: 5 additions & 3 deletions tests/_integration/utils.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

export TOP_PID=$$
trap "exit 1" TERM
export status=0

fail () {
printf "\033[1m\033[31m ${2} fail \x1b[0m\n"
printf "\033[1m\033[31m ${2:-} fail \x1b[0m\n"
}

success () {
printf "\033[1m\033[32m ${2} success \x1b[0m\n"
printf "\033[1m\033[32m ${2:-} success \x1b[0m\n"
}

check_result_zero (){
Expand Down
2 changes: 1 addition & 1 deletion tests/check_ios_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash


while true; do
Expand Down
4 changes: 3 additions & 1 deletion tests/phpthemis/composer-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Expand Down
4 changes: 3 additions & 1 deletion tests/phpthemis/init_env-php5.6.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

rm -f composer.json
ln -s composer-php5.6.json composer.json
Expand Down
4 changes: 3 additions & 1 deletion tests/phpthemis/init_env-php7.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

rm -f composer.json

Expand Down
4 changes: 3 additions & 1 deletion tests/phpthemis/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash

set -eu

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
Expand Down
2 changes: 1 addition & 1 deletion tests/rust/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

set -e

Expand Down
2 changes: 1 addition & 1 deletion tests/soter/nist-sts/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

CC ?= /usr/bin/gcc
CC ?= gcc

CFLAGS += -Wall -Wno-unused
LDFLAGS += -lm
Expand Down
2 changes: 1 addition & 1 deletion tests/start_ios_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

START_BUILD_NUMBER=`curl -X POST --header "Accept: application/json" https://circleci.com/api/v1/project/cossacklabs/themis-ios-tests/tree/master\?circle-token=$OBJCTHEMIS_TEST_TOKEN | python -m json.tool | sed -n -e '/"build_num":/ s/^.*"build_num": \(.*\),/\1/p' | sed -n -e '1s/^\([0-9]*\).*/\1/p'`
echo $START_BUILD_NUMBER
9 changes: 6 additions & 3 deletions tests/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ prepare_tests_basic: soter_test themis_test
prepare_tests_all: prepare_tests_basic themispp_test
ifdef PHP_VERSION
@echo -n "make tests for phpthemis "
@echo "#!/bin/bash -e" > ./$(BIN_PATH)/tests/phpthemis_test.sh
@echo "#!/usr/bin/env bash" > ./$(BIN_PATH)/tests/phpthemis_test.sh
@echo "set -eu" >> ./$(BIN_PATH)/tests/phpthemis_test.sh
@echo "cd tests/phpthemis; bash ./run_tests.sh" >> ./$(BIN_PATH)/tests/phpthemis_test.sh
@chmod a+x ./$(BIN_PATH)/tests/phpthemis_test.sh
@$(PRINT_OK_)
endif
ifdef RUBY_GEM_VERSION
@echo -n "make tests for rbthemis "
@echo "#!/bin/bash -e" > ./$(BIN_PATH)/tests/rbthemis_test.sh
@echo "#!/usr/bin/env bash" > ./$(BIN_PATH)/tests/rbthemis_test.sh
@echo "set -eu" >> ./$(BIN_PATH)/tests/rbthemis_test.sh
@echo "ruby ./tests/rbthemis/scell_test.rb" >> ./$(BIN_PATH)/tests/rbthemis_test.sh
@echo "ruby ./tests/rbthemis/smessage_test.rb" >> ./$(BIN_PATH)/tests/rbthemis_test.sh
@echo "ruby ./tests/rbthemis/ssession_test.rb" >> ./$(BIN_PATH)/tests/rbthemis_test.sh
Expand All @@ -63,7 +65,8 @@ ifdef RUBY_GEM_VERSION
endif
ifdef PYTHON3_VERSION
@echo -n "make tests for pythemis with python3 "
@echo "#!/bin/bash -e" > ./$(PYTHON3_TEST_SCRIPT)
@echo "#!/usr/bin/env bash" > ./$(PYTHON3_TEST_SCRIPT)
@echo "set -eu" >> ./$(PYTHON3_TEST_SCRIPT)
@echo "python3 -m unittest discover -s tests/pythemis" >> ./$(PYTHON3_TEST_SCRIPT)
@chmod a+x ./$(PYTHON3_TEST_SCRIPT)
@$(PRINT_OK_)
Expand Down
2 changes: 1 addition & 1 deletion tools/afl/analyze_crashes.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
#
# Analyze crashes found by American Fuzzy Lop
#
Expand Down