diff options
Diffstat (limited to 'list-depends')
-rwxr-xr-x | list-depends | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/list-depends b/list-depends new file mode 100755 index 0000000..4484be4 --- /dev/null +++ b/list-depends @@ -0,0 +1,33 @@ +#!/bin/bash + +[[ -n $stat_file ]] || stat_file='depends_static.txt' +[[ -n $prod_file ]] || prod_file='https://projects.parabolagnulinux.org/parabolaweb.git/plain/requirements_prod.txt' + +cat "${stat_file}" | +sed -r \ + -e 's/\s*#.*//' + +curl -s "${prod_file}" | +sed -r \ + -e 's|^-e .*/fredj/cssmin.git@master#egg=cssmin$|python2-cssmin-fredj|' \ + -e 's/.*/\L&/' \ + -e 's/^(python2?-)?/python2-/' \ + -e 's/jinja2?/jinja/' \ + -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 |