stockholm/bin/make-relative-to
2015-05-21 01:56:08 +02:00

7 lines
176 B
Bash
Executable File

#! /bin/sh
# make-relative-to : lines path |> directory -> lines path
# Non-matching paths won't get altered.
set -euf
sed "s:^$(echo "$1/" | bre-escape | sed 's/:/\\:/g')::"