poco/build/script/projname

17 lines
347 B
Plaintext
Raw Normal View History

2006-10-23 15:40:50 +00:00
#! /bin/sh
#
2007-02-23 14:50:42 +00:00
# $Id: //poco/Main/build/script/projname#7 $
2006-10-23 15:40:50 +00:00
#
# projname
#
# Extract the project name from the current path
# NOTE: the cd $POCO_BASE is necessary to resolve symbolic links,
# ditto is the kinda strange sh -c pwd
#
cdir=`sh -c pwd`
cd $POCO_BASE
pocobase=`sh -c pwd`
cd "$cdir"
sh -c pwd | sed "s:^$pocobase::" | sed "s:^/::"