Download fixes.sh from mikmc5/gem2test: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/spaces/mikmc5/gem2test/resolve/main/fixes.sh
- Command line
-
hf download hf://spaces/mikmc5/gem2test/fixes.sh
-
curl -L -o fixes.sh https://huggingface.co/spaces/mikmc5/gem2test/resolve/main/fixes.sh
631 Bytes
| echo 'checking fixes.sh permissions:' | |
| ls -l fixes.sh | |
| echo Done | |
| echo 'Checking simple-get > index.js file content' | |
| file_found=$(find node_modules/simple-get -type f -exec grep -l "else return simpleGet(opts, cb)" {} \;) | |
| echo "Found $file_found" | |
| echo "check if $file_found is fixed" | |
| checked=$(grep 'cb(null, res, opts.url)' $file_found) | |
| if [ -n "$checked" ]; then | |
| echo "Already fixed" | |
| else | |
| echo "Replacing..." | |
| sed -i s/.*'else return simpleGet(opts, cb)'.*/'else if(opts.url.startsWith("magnet")) return cb(null, res, opts.url) \n else return simpleGet(opts, cb)'/ $file_found | |
| echo "Replaced" | |
| fi | |