Browse Source

Replace with dotfiles script

main
parent
commit
9cd04f797e
  1. 23
      bin/dotfiles
  2. 5
      bin/git-fix-corrupt.sh

23
bin/dotfiles

@ -0,0 +1,23 @@
#!/usr/bin/env sh
# Print help text and exit.
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
cat <<HELP
Usage: dotfiles [options]
Examples:
- dotfiles fix Fix the local copy
- dotfiles -h Print the help message
HELP
exit 1
fi
# Fix any corruptions in the local copy.
if [ "$1" = "fix" ]; then
if [ -d .git/objects/ ]; then
find .git/objects/ -type f -empty | xargs rm
git fetch -p
git fsck --full
fi
exit 1
fi

5
bin/git-fix-corrupt.sh

@ -1,5 +0,0 @@
#!/usr/bin/env sh
find .git/objects/ -type f -empty | xargs rm
git fetch -p
git fsck --full
Loading…
Cancel
Save