Browse Source

Update dotfiles script

main
parent
commit
794daf336a
  1. 6
      bin/dotfiles

6
bin/dotfiles

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

Loading…
Cancel
Save