Skip to content

Commit

Permalink
Merge "[FAB-1476] Have Vagrant env cd to fabric dir"
Browse files Browse the repository at this point in the history
  • Loading branch information
christo4ferris authored and Gerrit Code Review committed Dec 23, 2016
2 parents 1b74e33 + 51abe0d commit e3b2d3f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions devenv/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF >/etc/profile.d/vagrant-devenv.sh
# Expose the devenv/tools in the $PATH
export PATH=\$PATH:/hyperledger/devenv/tools:/hyperledger/build/bin
Expand All @@ -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 <<EOF >> /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

0 comments on commit e3b2d3f

Please sign in to comment.