mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
much better
This commit is contained in:
@@ -52,25 +52,3 @@ function deep-mv (){
|
||||
rm -fr $1/!(tmp)
|
||||
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
|
||||
}
|
||||
|
||||
# Recursively finds requirements.txt files
|
||||
function list-req (){
|
||||
echo $@
|
||||
for req in $(grep -Fie "-r " $@ | sed 's/-r //g')
|
||||
do
|
||||
path="$(dirname $@)/$req"
|
||||
list-req $path
|
||||
done
|
||||
}
|
||||
|
||||
# Find pattern in requirements files recursively
|
||||
# Usage: $ in-req pattern file
|
||||
function in-req (){
|
||||
for file in $(list-req $2)
|
||||
do
|
||||
if (grep -Fiqe "$1" "$file") then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user