summaryrefslogtreecommitdiffstats
path: root/scripts/index-filter.sh
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-02-27 21:46:31 +0000
committerimp <imp@FreeBSD.org>2014-02-27 21:46:31 +0000
commitdb4b3717cfd3ba17b40dae57a2f327e91f831bf8 (patch)
treeff6e99cffa59c3e85a311d8dd06e6f6dab4988b2 /scripts/index-filter.sh
downloadFreeBSD-src-db4b3717cfd3ba17b40dae57a2f327e91f831bf8.zip
FreeBSD-src-db4b3717cfd3ba17b40dae57a2f327e91f831bf8.tar.gz
Move to dist, per layout standards
Diffstat (limited to 'scripts/index-filter.sh')
-rwxr-xr-xscripts/index-filter.sh15
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
OpenPOWER on IntegriCloud