Last active
November 5, 2019 14:55
-
-
Save fatso83/cee5fb7bf3d9ee59f3caaad6d3ea777d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# @author Carl-Erik Kopseng [email protected] | |
MAP=/opt/TeamCity/buildAgent/work/directory.map | |
DIR=$(dirname $MAP) | |
sed -n -e '1,3d;1,/#/{/#/!p}' $MAP | \ | |
awk -v pwd=$PWD ' | |
{ | |
n = split($0, array, "->"); | |
proj = substr(array[1], 6) | |
tcdir = substr(array[2],2,16) | |
fulldir = pwd "/" tcdir | |
printf("%-35s %16s \n", proj, fulldir); | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: