diff options
Diffstat (limited to 'scripts/index-filter.sh')
-rwxr-xr-x | scripts/index-filter.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/index-filter.sh b/scripts/index-filter.sh new file mode 100755 index 0000000..d68238a --- /dev/null +++ b/scripts/index-filter.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +set -o pipefail + +git ls-files -s | tee /tmp/bar | sed -n -f ${SCRIPTS}/rewrite-paths.sed | tee /tmp/foo | \ + GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info + +if [ -f "$GIT_INDEX_FILE.new" ] ; then + mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE" +else + rm "$GIT_INDEX_FILE" +fi + +exit 0 |