don't edit derivations with multiple fetchers, or with "DO NOT EDIT" in them

This commit is contained in:
Ryan Mulligan 2018-03-21 19:07:06 -07:00
parent 8e0f388962
commit 383c07a66a

6
up.sh
View File

@ -76,6 +76,12 @@ function error_cleanup {
}
trap error_cleanup ERR
(( $(grep -c "fetchurl" "$DERIVATION_FILE") + $(grep -c "fetchgit" "$DERIVATION_FILE") + $(grep -c "fetchFromGitHub" "$DERIVATION_FILE") == 1 )) || error_exit "More than one fetcher in $DERIVATION_FILE"
if grep -q "DO NOT EDIT" "$DERIVATION_FILE"
then
error_exit "Derivation file says not to edit it."
fi
# Skip packages that have special builders
if grep -q "buildGoPackage" "$DERIVATION_FILE"