[contrib] fix extract-secp256k1.sh to support spaces in filenames
Summary:
This makes xargs work with filenames that include blanck spaces.
From the args man page:
-I replace-str
Replace occurrences of replace-str in the initial-
arguments with names read from standard input. Also,
unquoted blanks do not terminate input items; instead the
separator is the newline character. Implies -x and -L 1.
-L max-lines
Use at most max-lines nonblank input lines per command
line. Trailing blanks cause an input line to be logically
continued on the next input line. Implies -x.
-x, --exit
Exit if the size (see the -s option) is exceeded.Test Plan:
Clone the monorepo and run:
git ls-files \
| grep -v "^cmake\|^src/secp256k1" \
| xargs -I{} git rm -q --cached {};Check that it no longer errors on "electrum/electrumabc_plugins/fusion/Cash Fusion Logo - No Text.svg"
Check with git status and a file explorer that all files are deleted except for cmake/* and src/secp256k1/*.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14143