File: diff-remove-abspath

package info (click to toggle)
zkg 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,740 kB
  • sloc: python: 5,910; sh: 268; makefile: 265; cpp: 24
file content (12 lines) | stat: -rwxr-xr-x 214 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#! /usr/bin/env bash
#
# Replace absolute paths with the basename.

if [ `uname` == "Linux" ]; then
   sed="sed -r"
else
   sed="sed -E"
fi

$sed 's#/+#/#g' | \
$sed 's#/([^	 :/]{1,}/){1,}([^	 :/]{1,})#<...>/\2#g'