update-source-version: Check for sources not dependent on ${version}
This commit is contained in:
parent
e3b0c03507
commit
0101944621
|
@ -82,6 +82,11 @@ if [ -z "$newHash" ]; then
|
||||||
die "Couldn't figure out new hash of '$attr.src'!"
|
die "Couldn't figure out new hash of '$attr.src'!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$oldVersion" != "$newVersion" ] && [ "$oldHash" = "$newHash" ]; then
|
||||||
|
mv "$nixFile.bak" "$nixFile"
|
||||||
|
die "Both the old and new source hashes of '$attr.src' were equivalent. Please fix the package's source URL to be dependent on '\${version}'!"
|
||||||
|
fi
|
||||||
|
|
||||||
sed -i "$nixFile" -re "s|\"$tempHash\"|\"$newHash\"|"
|
sed -i "$nixFile" -re "s|\"$tempHash\"|\"$newHash\"|"
|
||||||
if cmp -s "$nixFile" "$nixFile.bak"; then
|
if cmp -s "$nixFile" "$nixFile.bak"; then
|
||||||
die "Failed to replace temporary source hash of '$attr' to the final source hash!"
|
die "Failed to replace temporary source hash of '$attr' to the final source hash!"
|
||||||
|
|
Loading…
Reference in New Issue