blob: 8d1a418a2bbde5c6c88e54b9531a3230fbae7366 [file] [log] [blame]
* Copyright (c) 2016 Oracle
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Contributors:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
<project name="corundum.macro.normalize-path">
Resolves parent folder (../) references in a path.
<macrodef name="normalize-path">
<attribute name="property"/>
<attribute name="path"/>
<basename property=".basename" file="@{path}"/>
<dirname property=".dirname" file="@{path}"/>
<var name="@{property}" value="${.dirname}${file.separator}${.basename}"/>
<var name=".basename" unset="true"/>
<var name=".dirname" unset="true"/>