Skip to content
Snippets Groups Projects
Commit 2874ad80 authored by Robert Lange's avatar Robert Lange
Browse files

[finc] extend devops find-file.sh to search for strings in files across instances

parent 6514be58
No related merge requests found
......@@ -19,15 +19,23 @@
Help()
{
# Display Help
echo "---------------------------------------------"
echo "This script looks for occurences of files on finc instance branches. Usage: find-file.sh [file name]"
echo "Example: \"./devops/find-file.sh myresearch/edit.phtml\""
echo "Example: \"./devops/find-file.sh myresearch/edit.phtml"
echo "---------------------------------------------"
echo "To find files CONTAINING a certain string set option c. Usage: find-file.sh -c [search string]"
echo "Example: \"./devops/find-file.sh -c loanHistoryAction"
echo "---------------------------------------------"
}
while getopts ":h" option; do
while getopts ":ch" option; do
case $option in
h) # display Help
h) echo "display Help..."
Help
exit;;
c) echo "looking for files containin a string..."
git branch --list *instance* | tr -d \* | tr -d '+'| xargs git grep $2
exit;;
\?) # incorrect option
echo "Error: Invalid option"
exit 1;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment