[Pkg-owncloud-commits] [owncloud] 157/215: Replace `replace` with `sed` statement
David Prévot
taffit at moszumanska.debian.org
Tue May 5 01:01:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 0ab16cb82390ac751ff3532f11c4e1990dfd47c9
Author: Morris Jobke <hey at morrisjobke.de>
Date: Tue Apr 28 11:17:46 2015 +0200
Replace `replace` with `sed` statement
---
apps/files_external/tests/env/start-ftp-morrisjobke.sh | 2 +-
apps/files_external/tests/env/start-sftp-atmoz.sh | 2 +-
apps/files_external/tests/env/start-smb-silvershell.sh | 2 +-
apps/files_external/tests/env/start-smb-windows.sh | 2 +-
apps/files_external/tests/env/start-webdav-ownCloud.sh | 2 +-
apps/files_external/tests/env/stop-ftp-morrisjobke.sh | 2 +-
apps/files_external/tests/env/stop-sftp-atmoz.sh | 2 +-
apps/files_external/tests/env/stop-smb-silvershell.sh | 2 +-
apps/files_external/tests/env/stop-smb-windows.sh | 2 +-
apps/files_external/tests/env/stop-webdav-ownCloud.sh | 2 +-
autotest-external.sh | 9 ++-------
11 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/apps/files_external/tests/env/start-ftp-morrisjobke.sh b/apps/files_external/tests/env/start-ftp-morrisjobke.sh
index 3831e78..a082e61 100755
--- a/apps/files_external/tests/env/start-ftp-morrisjobke.sh
+++ b/apps/files_external/tests/env/start-ftp-morrisjobke.sh
@@ -23,7 +23,7 @@ echo "Fetch recent morrisjobke/docker-proftpd docker image"
docker pull morrisjobke/docker-proftpd
# retrieve current folder to place the config in the parent folder
-thisFolder=`echo $0 | replace "env/start-ftp-morrisjobke.sh" ""`
+thisFolder=`echo $0 | sed 's#env/start-ftp-morrisjobke\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/start-sftp-atmoz.sh b/apps/files_external/tests/env/start-sftp-atmoz.sh
index f77c7a3..04b829a 100755
--- a/apps/files_external/tests/env/start-sftp-atmoz.sh
+++ b/apps/files_external/tests/env/start-sftp-atmoz.sh
@@ -23,7 +23,7 @@ echo "Fetch recent atmoz/sftp docker image"
docker pull atmoz/sftp
# retrieve current folder to place the config in the parent folder
-thisFolder=`echo $0 | replace "env/start-sftp-atmoz.sh" ""`
+thisFolder=`echo $0 | sed 's#env/start-sftp-atmoz\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/start-smb-silvershell.sh b/apps/files_external/tests/env/start-smb-silvershell.sh
index f72ad3f..afada44 100755
--- a/apps/files_external/tests/env/start-smb-silvershell.sh
+++ b/apps/files_external/tests/env/start-smb-silvershell.sh
@@ -23,7 +23,7 @@ echo "Fetch recent silvershell/samba docker image"
docker pull silvershell/samba
# retrieve current folder to place the config in the parent folder
-thisFolder=`echo $0 | replace "env/start-smb-silvershell.sh" ""`
+thisFolder=`echo $0 | sed 's#env/start-smb-silvershell\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/start-smb-windows.sh b/apps/files_external/tests/env/start-smb-windows.sh
index d56b0d4..a5a19ff 100755
--- a/apps/files_external/tests/env/start-smb-windows.sh
+++ b/apps/files_external/tests/env/start-smb-windows.sh
@@ -9,7 +9,7 @@
#
# retrieve current folder to place the config in the parent folder
-thisFolder=`echo $0 | replace "env/start-smb-windows.sh" ""`
+thisFolder=`echo $0 | sed 's#env/start-smb-windows\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/start-webdav-ownCloud.sh b/apps/files_external/tests/env/start-webdav-ownCloud.sh
index 58b87e8..d6b36c8 100755
--- a/apps/files_external/tests/env/start-webdav-ownCloud.sh
+++ b/apps/files_external/tests/env/start-webdav-ownCloud.sh
@@ -26,7 +26,7 @@ echo "Fetch recent morrisjobke/owncloud docker image"
docker pull morrisjobke/owncloud
# retrieve current folder to place the config in the parent folder
-thisFolder=`echo $0 | replace "env/start-webdav-ownCloud.sh" ""`
+thisFolder=`echo $0 | sed 's#env/start-webdav-ownCloud\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/stop-ftp-morrisjobke.sh b/apps/files_external/tests/env/stop-ftp-morrisjobke.sh
index d8c6cc4..899b9a5 100755
--- a/apps/files_external/tests/env/stop-ftp-morrisjobke.sh
+++ b/apps/files_external/tests/env/stop-ftp-morrisjobke.sh
@@ -17,7 +17,7 @@ fi
echo "Docker executable found - stop and remove docker containers"
# retrieve current folder to remove the config from the parent folder
-thisFolder=`echo $0 | replace "env/stop-ftp-morrisjobke.sh" ""`
+thisFolder=`echo $0 | sed 's#env/stop-ftp-morrisjobke\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/stop-sftp-atmoz.sh b/apps/files_external/tests/env/stop-sftp-atmoz.sh
index 829855c..64570cf 100755
--- a/apps/files_external/tests/env/stop-sftp-atmoz.sh
+++ b/apps/files_external/tests/env/stop-sftp-atmoz.sh
@@ -17,7 +17,7 @@ fi
echo "Docker executable found - stop and remove docker containers"
# retrieve current folder to remove the config from the parent folder
-thisFolder=`echo $0 | replace "env/stop-sftp-atmoz.sh" ""`
+thisFolder=`echo $0 | sed 's#env/stop-sftp-atmoz\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/stop-smb-silvershell.sh b/apps/files_external/tests/env/stop-smb-silvershell.sh
index 6ae28d1..aae9542 100755
--- a/apps/files_external/tests/env/stop-smb-silvershell.sh
+++ b/apps/files_external/tests/env/stop-smb-silvershell.sh
@@ -17,7 +17,7 @@ fi
echo "Docker executable found - stop and remove docker containers"
# retrieve current folder to remove the config from the parent folder
-thisFolder=`echo $0 | replace "env/stop-smb-silvershell.sh" ""`
+thisFolder=`echo $0 | sed 's#env/stop-smb-silvershell\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/stop-smb-windows.sh b/apps/files_external/tests/env/stop-smb-windows.sh
index 8e9c82b..4f89451 100755
--- a/apps/files_external/tests/env/stop-smb-windows.sh
+++ b/apps/files_external/tests/env/stop-smb-windows.sh
@@ -7,7 +7,7 @@
#
# retrieve current folder to remove the config from the parent folder
-thisFolder=`echo $0 | replace "env/stop-smb-windows.sh" ""`
+thisFolder=`echo $0 | sed 's#env/stop-smb-windows\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/apps/files_external/tests/env/stop-webdav-ownCloud.sh b/apps/files_external/tests/env/stop-webdav-ownCloud.sh
index 9d75c2b..c87760a 100755
--- a/apps/files_external/tests/env/stop-webdav-ownCloud.sh
+++ b/apps/files_external/tests/env/stop-webdav-ownCloud.sh
@@ -17,7 +17,7 @@ fi
echo "Docker executable found - stop and remove docker containers"
# retrieve current folder to remove the config from the parent folder
-thisFolder=`echo $0 | replace "env/stop-webdav-ownCloud.sh" ""`
+thisFolder=`echo $0 | sed 's#env/stop-webdav-ownCloud\.sh##'`
if [ -z "$thisFolder" ]; then
thisFolder="."
diff --git a/autotest-external.sh b/autotest-external.sh
index 6ebe093..65d53aa 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list