cic-stack/apps/util/requirements/update_base.sh
2021-07-05 10:58:08 +00:00

27 lines
557 B
Bash

#!/bin/bash
which pyreq-merge &> /dev/null
if [ $? -gt 0 ]; then
>&2 echo pyreq-merge missing, please install requirements
exit 1
fi
t=$(mktemp)
>&2 echo using tmp $t
repos=(../../cic-cache ../../cic-eth ../../cic-ussd ../../data-seeding ../../cic-notify ../../contract-migration)
for r in ${repos[@]}; do
f="$r/requirements.txt"
>&2 echo updating $f
pyreq-update $f base_requirement.txt -v > $t
cp $t $f
f="$r/test_requirements.txt"
if [ -f $f ]; then
>&2 echo updating $f
pyreq-update $f base_requirement.txt -v > $t
cp $t $f
fi
done