From 51abe0d428d5fecf597e68f78cc97bc9599957e4 Mon Sep 17 00:00:00 2001 From: Kostas Christidis Date: Thu, 22 Dec 2016 16:18:18 -0500 Subject: [PATCH] [FAB-1476] Have Vagrant env cd to fabric dir https://jira.hyperledger.org/browse/FAB-1476 This changeset modifies `.bashrc` so that it cd's the user automatically to `$GOPATH/src/github.com/hyperledger/fabric` upon logging in. Change-Id: I4c5722d8c3b4796de34385e837a6cf12f2af6e82 Signed-off-by: Kostas Christidis --- devenv/setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/devenv/setup.sh b/devenv/setup.sh index aa8ebcd1f30..3fb0eb5708d 100755 --- a/devenv/setup.sh +++ b/devenv/setup.sh @@ -95,7 +95,7 @@ sudo chown -R vagrant:vagrant $GOPATH # Update limits.conf to increase nofiles for RocksDB sudo cp /hyperledger/devenv/limits.conf /etc/security/limits.conf -# configure vagrant specific environment +# Configure vagrant specific environment cat </etc/profile.d/vagrant-devenv.sh # Expose the devenv/tools in the $PATH export PATH=\$PATH:/hyperledger/devenv/tools:/hyperledger/build/bin @@ -105,7 +105,11 @@ export CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" EOF # Set our shell prompt to something less ugly than the default from packer -echo "PS1=\"\u@hyperledger-devenv:v$BASEIMAGE_RELEASE-$DEVENV_REVISION:\w$ \"" >> /home/vagrant/.bashrc +# Also make it so that it cd's the user to the fabric dir upon logging in +cat <> /home/vagrant/.bashrc +PS1="\u@hyperledger-devenv:v$BASEIMAGE_RELEASE-$DEVENV_REVISION:\w$ " +cd $GOPATH/src/github.com/hyperledger/fabric/ +EOF # finally, remove our warning so the user knows this was successful rm /etc/motd