mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
20 lines
401 B
Bash
Executable File
20 lines
401 B
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# $Id: //poco/1.4/build/script/projname#1 $
|
|
#
|
|
# projname
|
|
#
|
|
# Usage: projname PROJECT_BASE
|
|
#
|
|
# Extract the project name from the current path
|
|
# NOTE: the cd $PROJECT_BASE is necessary to resolve symbolic links,
|
|
# ditto is the kinda strange sh -c pwd
|
|
#
|
|
|
|
PROJECT_BASE=$1
|
|
cdir=`sh -c pwd`
|
|
cd $PROJECT_BASE
|
|
projbase=`sh -c pwd`
|
|
cd "$cdir"
|
|
sh -c pwd | sed "s:^$projbase::" | sed "s:^/::"
|