pipepipexiaji / resolve

Resolves and tidies a relative path against a base path or URI. Given only a basePath, simplifies it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resolve 0.1.2

Usage:

resolve [-h] basePath [relPath]

Resolves a relative path against a base path or URI. Given only a basePath, simplifies it.

Examples:

$ resolve /path/to/base ../hello/world/program//
/path/to/hello/world/program/

$ resolve http://example.com/catalog ../app1/download/file.tar.bz2
http://example.com/app1/download/file.tar.bz2

$ resolve /messy/../../complicated////../path/before/../tidied
/path/tidied

Install

Mac

brew tap chaimleib/formulae
brew install resolve

Other Unixes

git clone https://github.com/chaimleib/resolve.git
./configure
make
make install

Uninstall

make uninstall

Features

  • Does not access the filesystem or network; this is a string manipulation tool.
  • Written to be cross-platform on Mac, Linux, and Cygwin.

Changelog

  • 0.0.1 - initial release
  • 0.0.2 (2014-08-31) - made relpaths beginning with '/' reseolve against the root
  • 0.1.0 - added configure script
  • 0.1.1 - rm temp files
  • 0.1.2 - update README

About

Resolves and tidies a relative path against a base path or URI. Given only a basePath, simplifies it.

License:Apache License 2.0


Languages

Language:Shell 96.1%Language:Makefile 3.2%Language:M4 0.7%