From 0ab16cb82390ac751ff3532f11c4e1990dfd47c9 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 28 Apr 2015 11:17:46 +0200 Subject: Replace `replace` with `sed` statement --- autotest-external.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'autotest-external.sh') diff --git a/autotest-external.sh b/autotest-external.sh index 6ebe093c8a7..65d53aaa95d 100755 --- a/autotest-external.sh +++ b/autotest-external.sh @@ -32,11 +32,6 @@ if ! [ -x "$PHPUNIT" ]; then exit 3 fi -if ! which replace > /dev/null 2>&1; then - echo "The command 'replace' is not available on this system. Please install it first." >&2 - exit 5 -fi - PHPUNIT_VERSION=$("$PHPUNIT" --version | cut -d" " -f2) PHPUNIT_MAJOR_VERSION=$(echo $PHPUNIT_VERSION | cut -d"." -f1) PHPUNIT_MINOR_VERSION=$(echo $PHPUNIT_VERSION | cut -d"." -f2) @@ -181,7 +176,7 @@ EOF FILES_EXTERNAL_BACKEND_ENV_PATH=../apps/files_external/tests/env for startFile in `ls -1 $FILES_EXTERNAL_BACKEND_ENV_PATH | grep start`; do - name=`echo $startFile | replace "start-" "" | replace ".sh" ""` + name=`echo $startFile | sed 's/start-//' | sed 's/\.sh//'` if [ -n "$2" -a "$2" != "$name" ]; then echo "skip: $startFile" @@ -211,7 +206,7 @@ EOF fi # calculate stop file - stopFile=`echo "$startFile" | replace start stop` + stopFile=`echo "$startFile" | sed 's/start/stop/'` echo "stop: $stopFile" if [ -f $FILES_EXTERNAL_BACKEND_ENV_PATH/$stopFile ]; then # execute stop file if existant -- cgit v1.2.3