Download contracts/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh from UTSCybeR/nftbench: direct link, hf CLI and curl.
- Browser
- Download file 410 Bytes
-
https://huggingface.co/datasets/UTSCybeR/nftbench/resolve/main/contracts/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh
- Command line
-
hf download hf://datasets/UTSCybeR/nftbench/contracts/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh
-
curl -L -o patch-apply.sh https://huggingface.co/datasets/UTSCybeR/nftbench/resolve/main/contracts/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh
410 Bytes
| set -euo pipefail | |
| DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" | |
| PATCH="$DIRNAME/upgradeable.patch" | |
| error() { | |
| echo Error: "$*" >&2 | |
| exit 1 | |
| } | |
| if ! git diff-files --quiet ":!$PATCH" || ! git diff-index --quiet HEAD ":!$PATCH"; then | |
| error "Repository must have no staged or unstaged changes" | |
| fi | |
| if ! git apply -3 "$PATCH"; then | |
| error "Fix conflicts and run $DIRNAME/patch-save.sh" | |
| fi | |