Changeset View
Changeset View
Standalone View
Standalone View
contrib/extract-secp256k1.sh
Show All 19 Lines | |||||
# Find the source repository's location. | # Find the source repository's location. | ||||
pushd "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | pushd "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||||
REPO_DIR=$(git rev-parse --show-toplevel) | REPO_DIR=$(git rev-parse --show-toplevel) | ||||
popd | popd | ||||
git clone "file://${REPO_DIR}" "${WORKDIR}" -b master | git clone "file://${REPO_DIR}" "${WORKDIR}" -b master | ||||
pushd "${WORKDIR}" | pushd "${WORKDIR}" | ||||
# shellcheck disable=SC1004 | |||||
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch \ | FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch \ | ||||
--index-filter 'git ls-files \ | --index-filter 'git ls-files \ | ||||
| grep -v "^cmake\|^src/secp256k1" \ | | grep -v "^cmake\|^src/secp256k1" \ | ||||
| xargs git rm -q --cached; | | xargs git rm -q --cached; | ||||
git ls-files -s \ | git ls-files -s \ | ||||
| sed "s%src/secp256k1/%%" \ | | sed "s%src/secp256k1/%%" \ | ||||
| git update-index --index-info; | | git update-index --index-info; | ||||
git rm -rq --cached --ignore-unmatch src/secp256k1' \ | git rm -rq --cached --ignore-unmatch src/secp256k1' \ | ||||
Show All 12 Lines |