view tools/rootup.sh @ 187:f3b340294261

fix pin name (wps->reset)
author ray@terran.dlink.ua
date Tue, 02 Aug 2011 00:25:22 +0300
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}