2021-07-01 08:00:58 +00:00
|
|
|
#!/bin/sh
|
2021-08-25 12:09:19 +00:00
|
|
|
|
2021-08-31 09:48:16 +00:00
|
|
|
echo -e "Run \"pip download --no-binary PyYAML,msgpack,netifaces -r requirements-$1.txt\" to update,\n\
|
2021-08-25 12:09:19 +00:00
|
|
|
and add output from \"sha512sum --tag <updated-files>\" to sources, and update spec-file."
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
##
|
|
|
|
|
2021-07-01 08:00:58 +00:00
|
|
|
export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring"
|
|
|
|
|
|
|
|
find -maxdepth 1 -not -name "fence-agents-*.tar.gz" -and -not -name "awscli-*.tar.gz" -and -not -name "botocore-2*.zip" -and \( -name "*.whl" -or -name "*.tar.?z*" \) -delete
|
|
|
|
sed -i -n -E '/\(fence-agents-|\(awscli-|\(botocore-2/p' sources
|
|
|
|
sha512sum --tag requirements-*.txt >> sources
|
|
|
|
|
|
|
|
for x in requirements-*.txt; do
|
|
|
|
echo "# $x" | sed -E "s/requirements-(.*).txt/\1/" >> sources
|
2021-08-31 09:48:16 +00:00
|
|
|
pip download --no-binary PyYAML,msgpack,netifaces -r $x | awk '/Saved/{gsub("./", "", $2); print $2}' | sort | xargs sha512sum --tag >> sources
|
2021-07-01 08:00:58 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
awk 'NR<11{next} /^# /{print}; /^[^#]/{gsub("[()]", "", $2); printf "Source%d: %s\n", 1000+c++, $2}' sources
|
|
|
|
|
|
|
|
sed -i '/^#/d' sources
|
|
|
|
|
|
|
|
if ! git diff --quiet sources; then
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
Upload new sources by running:
|
|
|
|
awk '/^[^#]/{gsub("[()]", "", \$2); printf "%s ", \$2}' sources | xargs centpkg new-sources
|
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|