1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-01-19 13:44:41 +01:00
Files
SqMod/vendor/POCO/build/script/projname
Sandu Liviu Catalin f2b7499f85 Update libraries and make it build on windows.
Still gets some warnings because compilers have changed. But should work.
2025-06-25 22:34:23 +03:00

18 lines
375 B
Bash

#! /bin/sh
#
# 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" || exit
projbase=$(sh -c pwd)
cd "$cdir" || exit
sh -c pwd | sed "s:^$projbase::" | sed "s:^/::"