view tools/rootup.sh @ 493:f9461de5ba49

add port-build empty target for case when no ports selected to build.
author Aleksandr Rybalko <ray@ddteam.net>
date Tue, 27 Nov 2012 16:03:20 +0200
parents b0ce362d3832
children d5a47dc8d6a1
line wrap: on
line source
#!/bin/sh

SRCPATH=$1

ROOTUP="/.."
_FOR_ROOTUP=`echo ${SRCPATH} | sed 's/\// /g'`
for r in ${_FOR_ROOTUP}; do
	_ROOTUP_TEST=`realpath ${SRCPATH}/${ROOTUP}`
	if [ "x${_ROOTUP_TEST}" != "x/" ] ; then
		ROOTUP="${ROOTUP}/.."
	fi
done


echo ${ROOTUP}