You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
471 B
23 lines
471 B
#!/usr/bin/env sh
|
|
|
|
# Print help text and exit.
|
|
if [ "$1" = "help" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
|
cat <<HELP
|
|
Usage: dotfiles [options]
|
|
|
|
Examples:
|
|
- dotfiles help [-h] Print the help message
|
|
- dotfiles fix Fix the local copy
|
|
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 -f
|
|
git fetch -p
|
|
git fsck --full
|
|
fi
|
|
exit 1
|
|
fi
|