When defining ONOS_ROOT strip out any symlinks

This is a workaround for problems with building GRPC with buck
on some machines.

Change-Id: If7d306a5bf59ba5a86c8ff2fd9cb9f0f3527fb61
diff --git a/tools/build/onos-prepare-release b/tools/build/onos-prepare-release
index 8e4ecc6..9869ac3 100755
--- a/tools/build/onos-prepare-release
+++ b/tools/build/onos-prepare-release
@@ -35,6 +35,9 @@
 cp $ONOS_ROOT/.buckconfig.local $DIR/
 
 export ONOS_ROOT=$DIR
+# This is a hack to remove symlinks from the ONOS_ROOT path. To be removed when
+# the protobuf buck rules can handle symlinks
+ONOS_ROOT=$(pushd $ONOS_ROOT >/dev/null && pwd -P && popd >/dev/null)
 . $ONOS_ROOT/tools/build/envDefaults
 exec bash $COMMAND
 
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index afac5f6..15dcd07 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -4,6 +4,9 @@
 
 # Root of the ONOS source tree
 export ONOS_ROOT=${ONOS_ROOT:-~/onos}
+# This is a hack to remove symlinks from the ONOS_ROOT path. To be removed when
+# the protobuf buck rules can handle symlinks
+ONOS_ROOT=$(pushd $ONOS_ROOT >/dev/null && pwd -P && popd >/dev/null)
 
 # Setup some environmental context for developers
 if [ -z "${JAVA_HOME}" ]; then