aboutsummaryrefslogtreecommitdiff
path: root/scripts/index-filter.sh
blob: d68238af2febbe6860df7450df2295495c889109 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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