Skip to content

Commit 51abe0d

Browse files
committed
[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 <[email protected]>
1 parent 384e294 commit 51abe0d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

devenv/setup.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ sudo chown -R vagrant:vagrant $GOPATH
9595
# Update limits.conf to increase nofiles for RocksDB
9696
sudo cp /hyperledger/devenv/limits.conf /etc/security/limits.conf
9797

98-
# configure vagrant specific environment
98+
# Configure vagrant specific environment
9999
cat <<EOF >/etc/profile.d/vagrant-devenv.sh
100100
# Expose the devenv/tools in the $PATH
101101
export PATH=\$PATH:/hyperledger/devenv/tools:/hyperledger/build/bin
@@ -105,7 +105,11 @@ export CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"
105105
EOF
106106

107107
# Set our shell prompt to something less ugly than the default from packer
108-
echo "PS1=\"\u@hyperledger-devenv:v$BASEIMAGE_RELEASE-$DEVENV_REVISION:\w$ \"" >> /home/vagrant/.bashrc
108+
# Also make it so that it cd's the user to the fabric dir upon logging in
109+
cat <<EOF >> /home/vagrant/.bashrc
110+
PS1="\u@hyperledger-devenv:v$BASEIMAGE_RELEASE-$DEVENV_REVISION:\w$ "
111+
cd $GOPATH/src/github.com/hyperledger/fabric/
112+
EOF
109113

110114
# finally, remove our warning so the user knows this was successful
111115
rm /etc/motd

0 commit comments

Comments
 (0)