Skip to content
Snippets Groups Projects
Commit e3e0eebf authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Added history rewriting scripts

parent f733e69f
Branches
No related tags found
No related merge requests found
#!/bin/bash
echo -n "Are you sure you wan't to rewrite git history [no/yes] "
read -r LINE
if [[ "${LINE}" == "yes" ]] ; then
HOME=/dev/null git filter-branch \
--prune-empty \
--tree-filter "$(dirname $0)/kicad-filter-branch" HEAD
fi
\ No newline at end of file
#!/bin/bash
echo
cat<<EOF > .gitattributes
*.pro filter=kicad-pro
*.sch ident
*.sch filter=kicad-sch
EOF
ls 1>&2
for f in * .??* ; do
echo "$(git hash-object $f) $f"
done
for f in $(find . -name '*.sch') ; do
TMP=$(mktemp)
echo "Cleaning $f" 1>&2
cat "$f" | $(dirname "$0")/kicad-sch-filter clean "$f" > "${TMP}"
mv "${TMP}" "$f"
done
for f in $(find . -name '*.pro') ; do
TMP=$(mktemp)
echo "Cleaning $f" 1>&2
cat "$f" | $(dirname "$0")/kicad-pro-filter clean "$f" > "${TMP}"
mv "${TMP}" "$f"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment