Skip to content

Commit 3863795

Browse files
authored
build: use posix sed -E instead of -r (#294)
1 parent c41f298 commit 3863795

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

build/travis/job_macos/bintray_app.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ FILE="$1"
6363
# Package: MachinekitClient-Nightly-MacOSX-<branch>-<arch> (e.g. MachinekitClient-Nightly-master-x64)
6464

6565
# Read app name from file name (get characters before first dash)
66-
APPNAME="$(basename "$FILE" | sed -r 's|^([^-]*)-.*$|\1|')"
66+
APPNAME="$(basename "$FILE" | sed -E 's|^([^-]*)-.*$|\1|')"
6767

6868
# Read version from the file name (get characters between first and last dash)
69-
VERSION="$(basename "$FILE" | sed -r 's|^[^-]*-(.*)-[^-]*$|\1|')"
69+
VERSION="$(basename "$FILE" | sed -E 's|^[^-]*-(.*)-[^-]*$|\1|')"
7070

7171
# Read architecture from file name (characters between last dash and .dmg)
72-
ARCH="$(basename "$FILE" | sed -r 's|^.*-([^-]*)\.dmg$|\1|')"
72+
ARCH="$(basename "$FILE" | sed -E 's|^.*-([^-]*)\.dmg$|\1|')"
7373

7474
case "${ARCH}" in
7575
x86_64|x64|amd64 )
@@ -107,10 +107,10 @@ else
107107
url_query="publish=1&override=1" # Automatically publish, overwrite existing
108108

109109
# Get Git branch from $VERSION (get characters between first and last dash)
110-
BRANCH="$(echo $VERSION | sed -r 's|^[^-]*-(.*)-[^-]*$|\1|')"
110+
BRANCH="$(echo $VERSION | sed -E 's|^[^-]*-(.*)-[^-]*$|\1|')"
111111

112112
# Get Git commit from $VERSION (get characters after last dash)
113-
COMMIT="$(echo $VERSION | sed -r 's|^.*-([^-]*)$|\1|')"
113+
COMMIT="$(echo $VERSION | sed -E 's|^.*-([^-]*)$|\1|')"
114114

115115
PCK_NAME="$APPNAME-MacOSX-$BRANCH-$ARCH"
116116
BINTRAY_REPO="${BINTRAY_REPO:-MachinekitClient-Development}" # env, or use "MachinekitClient-Development"

build/travis/job_macos/bintray_lib.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ FILE="$1"
6363
# Package: QtQuickVcp-Nightly-MacOSX-<branch>-<arch> (e.g. QtQuickVcp-Nightly-master-x64)
6464

6565
# Read app name from file name (get characters before first dash)
66-
APPNAME="$(basename "$FILE" | sed -r 's|^([^-]*)-.*$|\1|')"
66+
APPNAME="$(basename "$FILE" | sed -E 's|^([^-]*)-.*$|\1|')"
6767

6868
# Read version from the file name (get characters between first and almost last dash)
69-
VERSION="$(basename "$FILE" | sed -r 's|^[^-]*-(.*)-[^-]*-[^-]*$|\1|')"
69+
VERSION="$(basename "$FILE" | sed -E 's|^[^-]*-(.*)-[^-]*-[^-]*$|\1|')"
7070

7171
# Read architecture from file name (characters between last dash and .tar.gz)
72-
ARCH="$(basename "$FILE" | sed -r 's|^.*-([^-]*)\.tar.gz$|\1|')"
72+
ARCH="$(basename "$FILE" | sed -E 's|^.*-([^-]*)\.tar.gz$|\1|')"
7373

7474
case "${ARCH}" in
7575
x86_64|x64|amd64 )
@@ -107,10 +107,10 @@ else
107107
url_query="publish=1&override=1" # Automatically publish, overwrite existing
108108

109109
# Get Git branch from $VERSION (get characters between first and last dash)
110-
BRANCH="$(echo $VERSION | sed -r 's|^[^-]*-(.*)-[^-]*$|\1|')"
110+
BRANCH="$(echo $VERSION | sed -E 's|^[^-]*-(.*)-[^-]*$|\1|')"
111111

112112
# Get Git commit from $VERSION (get characters after last dash)
113-
COMMIT="$(echo $VERSION | sed -r 's|^.*-([^-]*)$|\1|')"
113+
COMMIT="$(echo $VERSION | sed -E 's|^.*-([^-]*)$|\1|')"
114114

115115
PCK_NAME="$APPNAME-MacOSX-$BRANCH-$ARCH"
116116
BINTRAY_REPO="${BINTRAY_REPO:-QtQuickVcp-Development}" # env, or use "QtQuickVcp-Development"

0 commit comments

Comments
 (0)