summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-17 13:11:37 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-17 13:11:37 -0400
commit573459de893b6d6df6a08466b1d015fd9dedbd46 (patch)
tree7006f9bcea6b95d1844f6a7e6897a87fd864a2cb
parent9f5dcf443543f58979777473af624f7390d2e41f (diff)
list-depends: treat == more strictly
-rwxr-xr-xlist-depends20
1 files changed, 18 insertions, 2 deletions
diff --git a/list-depends b/list-depends
index 1aa19ea..4484be4 100755
--- a/list-depends
+++ b/list-depends
@@ -11,7 +11,23 @@ curl -s "${prod_file}" |
sed -r \
-e 's|^-e .*/fredj/cssmin.git@master#egg=cssmin$|python2-cssmin-fredj|' \
-e 's/.*/\L&/' \
- -e 's/==/>=/' \
-e 's/^(python2?-)?/python2-/' \
-e 's/jinja2?/jinja/' \
- -e 's/django.countries/django-countries/'
+ -e 's/django.countries/django-countries/' |
+while read -r dep; do
+ # This one is a little more complicated, because with ==
+ # depends, I don't want to actually lock to that precise of a
+ # version; it would be a nightmare with keeping things in
+ # sync. So, let's turn == into >=, but also make sure the
+ # first two segments match.
+ if [[ $dep = *==* ]]; then
+ name="${dep%%==*}"
+ ver="${dep#*==}"
+ IFS=.
+ read major minor patch <<<"$ver"
+ echo "$name>=$ver"
+ echo "$name<$major.$((minor+1))"
+ else
+ echo "$dep"
+ fi
+done