From 4d0f7774caff0fb3498799cc95d626adc213b068 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Tue, 24 Mar 2020 11:12:18 +0100 Subject: [PATCH] Update Dockerfile & vagrant/provisioner.bash --- docker/Dockerfile | 1 + scripts/update_user_name.sh | 16 ++++++++++++++++ vagrant/provisioner.bash | 1 + 3 files changed, 18 insertions(+) create mode 100755 scripts/update_user_name.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index 1001456f4..53632698b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -90,6 +90,7 @@ RUN cd /home/etsi/dev \ && git checkout STF525 \ && cd /home/etsi/dev/STF525_Its/scripts \ && chmod 775 *.bash devenv.bash.* \ + && ./update_user_name.sh \ && cd /home/etsi \ && ln -sf /home/etsi/dev/STF525_Its/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash \ && ls -ltr /home/etsi \ diff --git a/scripts/update_user_name.sh b/scripts/update_user_name.sh new file mode 100755 index 000000000..3c33596e5 --- /dev/null +++ b/scripts/update_user_name.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Debug mode +#set -e +set -vx + +# Usage: sudo ./update_user_name.bash +# TODO Use git clone in temporary directory + +USER_NAME='s/vagrant/etsi/g' +for i in `find /home/etsi/dev/STF525_Its -name "*.cf*"` +do + sed --in-place "${USER_NAME}" $i +done + +exit 0 diff --git a/vagrant/provisioner.bash b/vagrant/provisioner.bash index 85b680949..dcf5a7361 100755 --- a/vagrant/provisioner.bash +++ b/vagrant/provisioner.bash @@ -79,6 +79,7 @@ cd /home/vagrant/dev/STF525_Its/ttcn/LibIts git checkout STF525 cd /home/vagrant/dev/STF525_Its/scripts chmod 775 *.bash devenv.bash.* +./update_user_name.sh cd /home/vagrant/dev/STF525_Its/docker chmod 775 *.sh cd /home/vagrant/dev/STF525_Its -- GitLab