Last active
December 22, 2015 05:19
-
-
Save jrha/6423244 to your computer and use it in GitHub Desktop.
Use dep files to search the source files of a compiled panc object.
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/bash | |
if [[ "$#" -eq 2 ]]; then | |
if [[ "$1" == *.dep ]]; then | |
awk '! /ABSENT_SOURCE/ {sub("^[^:]*:", "", $3); print $3$1($2!="TEXT"?"."tolower($2):"")}' $1 | xargs grep $2 | |
else | |
echo "DEP_FILE must be a pan dependency file" | |
fi | |
else | |
echo "Usage: searchprofile DEP_FILE NEEDLE" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment