Fix other occurences of GNU-specific sed invocation
This commit is contained in:
1 parent
1a98cbfff9
commit
292cbc484a
3 files changed
+6
-6
No files matched your search
+3
-3
@@ -88,9 +88,9 @@ build() {
|
|||||||
|
|
||||||
## Inject the version numbers and build the distributables
|
## Inject the version numbers and build the distributables
|
||||||
## (library versions?)
|
## (library versions?)
|
||||||
sed -i "/SCRIPT_VERSION=/ c\SCRIPT_VERSION=\"$VERSION\"" ./weave
|
sed -i.bak "/SCRIPT_VERSION=/ c\SCRIPT_VERSION=\"$VERSION\"" ./weave
|
||||||
sed -i -e "s/:latest/:$VERSION/" -e "/imagePullPolicy: Always/d" ./prog/weave-kube/weave-daemonset.yaml
|
sed -i.bak -e "s/:latest/:$VERSION/" -e "/imagePullPolicy: Always/d" ./prog/weave-kube/weave-daemonset.yaml
|
||||||
sed -i -e "s/:latest/:$VERSION/" -e "/imagePullPolicy: Always/d" ./prog/weave-kube/weave-daemonset-k8s-1.6.yaml
|
sed -i.bak -e "s/:latest/:$VERSION/" -e "/imagePullPolicy: Always/d" ./prog/weave-kube/weave-daemonset-k8s-1.6.yaml
|
||||||
make SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER
|
make SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER
|
||||||
|
|
||||||
if make tests; then
|
if make tests; then
|
||||||
|
|||||||
Vendored
+1
-1
@@ -38,7 +38,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
|
|
||||||
host.vm.provision :shell, :inline => <<END
|
host.vm.provision :shell, :inline => <<END
|
||||||
# Tests rely on hostnames, so we remove potentially incorrect entries (e.g. localhost), and add mappings of IP addresses to hostnames:
|
# Tests rely on hostnames, so we remove potentially incorrect entries (e.g. localhost), and add mappings of IP addresses to hostnames:
|
||||||
sed -i '/#{hostname}/d' /etc/hosts
|
sed -i.bak '/#{hostname}/d' /etc/hosts
|
||||||
echo "#{ETC_HOSTS_ENTRIES}" >> /etc/hosts
|
echo "#{ETC_HOSTS_ENTRIES}" >> /etc/hosts
|
||||||
|
|
||||||
# Fix the resolution errors by using 8.8.8.8
|
# Fix the resolution errors by using 8.8.8.8
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ function use_or_create_image() {
|
|||||||
function update_local_etc_hosts() {
|
function update_local_etc_hosts() {
|
||||||
echo "> Updating local /etc/hosts..."
|
echo "> Updating local /etc/hosts..."
|
||||||
# Remove old entries (if present):
|
# Remove old entries (if present):
|
||||||
for host in $1; do sudo sed -i "/$host/d" /etc/hosts; done
|
for host in $1; do sudo sed -i.bak "/$host/d" /etc/hosts; done
|
||||||
# Add new entries:
|
# Add new entries:
|
||||||
sudo sh -c "echo \"$2\" >> /etc/hosts"
|
sudo sh -c "echo \"$2\" >> /etc/hosts"
|
||||||
}
|
}
|
||||||
@@ -183,7 +183,7 @@ function update_local_etc_hosts() {
|
|||||||
function upload_etc_hosts() {
|
function upload_etc_hosts() {
|
||||||
# Remove old entries (if present):
|
# Remove old entries (if present):
|
||||||
# shellcheck disable=SC2016,SC2086
|
# shellcheck disable=SC2016,SC2086
|
||||||
$SSH $3 'for host in '$1'; do sudo sed -i "/$host/d" /etc/hosts; done'
|
$SSH $3 'for host in '$1'; do sudo sed -i.bak "/$host/d" /etc/hosts; done'
|
||||||
# Add new entries:
|
# Add new entries:
|
||||||
echo "$2" | $SSH "$3" "sudo -- sh -c \"cat >> /etc/hosts\""
|
echo "$2" | $SSH "$3" "sudo -- sh -c \"cat >> /etc/hosts\""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user