diff --git a/src/bin/sage-fix-pkg-checksums b/src/bin/sage-fix-pkg-checksums index 65542b96145..aad18ae3c9e 100755 --- a/src/bin/sage-fix-pkg-checksums +++ b/src/bin/sage-fix-pkg-checksums @@ -12,12 +12,17 @@ for upstream in "$@" do tarball=`basename "$upstream"` pkg_name=${tarball%%-*} + # Convert to lowercase for the directory name: + pkg_name_lc=`echo $pkg_name | tr '[:upper:]' '[:lower:]'` pkg_compression=${tarball#*.tar} # gz or bz2 - if [ -d "$SAGE_ROOT/build/pkgs/$pkg_name" ]; then - sage_version=`cat "$SAGE_ROOT/build/pkgs/$pkg_name/package-version.txt" | sed 's/\.p[0-9][0-9]*$//'` + if [ -d "$SAGE_ROOT/build/pkgs/$pkg_name_lc" ]; then + sage_version=`cat "$SAGE_ROOT/build/pkgs/$pkg_name_lc/package-version.txt" | sed 's/\.p[0-9][0-9]*$//'` if [ ${tarball%.tar*} = "$pkg_name-$sage_version" ]; then echo >&2 $tarball - checksums="$SAGE_ROOT/build/pkgs/$pkg_name/checksums.ini" + if [ "$pkg_name" != "$pkg_name_lc" ]; then + echo >&2 " ** Note: case mismatch between upstream/$tarball and build/pkgs/$pkg_name_lc. **" + fi + checksums="$SAGE_ROOT/build/pkgs/$pkg_name_lc/checksums.ini" echo "tarball=$pkg_name-VERSION.tar$pkg_compression" > $checksums echo -n "sha1=" >> $checksums