Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 8beaf90

Browse files
committed
Remove trailing slash using sed
Substring replacement syntax requires bash #11
1 parent 55e6217 commit 8beaf90

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

bin/common.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ load_source () {
2929
"skip_ssl_verification": ( .source.skip_ssl_verification // "false" )
3030
} | to_entries[] | .key + "=" + @sh "\(.value)"
3131
' < /tmp/stdin )
32-
33-
if [ "${source_endpoint: -1}" = "/" ]
34-
then
35-
source_endpoint="${source_endpoint:: -1}"
36-
fi
32+
33+
source_endpoint=$( echo "$source_endpoint" | sed 's#/$##' )
3734
}
3835

3936
buildtpl () {

0 commit comments

Comments
 (0)