NicoHood / GPGit

A shell script that automates the process of signing Git sources via GPG
MIT License
89 stars 10 forks source link

Added OS X compatibility (and explanation) #14

Closed wolph closed 6 years ago

wolph commented 6 years ago

It's still not a walk in the park but should be doable now.

Better would be to replace the commands within the script so these steps aren't needed.

  1. If the script would use shasum -a 512 instead of sha512sum it would work just fine on both Linux and OS X.
  2. If the script would try /usr/local/Cellar/gnu-getopt/*/bin/getopt before the regular getopt it would fix that symlink as well.
NicoHood commented 6 years ago
  1. Instead of creating symlinks, how about a wrapper?
#!/bin/bash

function sha512sum {
    if [[ -e /usr/bin/sha512sum ]]; then
        echo "available"
    else
        echo "not available"
    fi
}

sha512sum
  1. Also you could pass --hash gsha512 which should also work. Then you can do git config --global gpgit.hash gsha512.

  2. I am thinking about the shasum -a 512 variant and removing md5 support completely. However I think there are still people who then will complain :/

wolph commented 6 years ago

A wrapper would work too but I think using shasum -a ... might be a better solution

And I don't think dropping md5sum is needed, it's just that the sha+sum methods are missing, shasum and md5sum are usually available.

NicoHood commented 6 years ago

@WoLpH thanks for the feedback! I've pushed some more commits with fixes and new features. It would be nice if you can give it a test on your non linux systems. I hope everything works fine so far.

Just FYI with the new -f, --force option you can force to recreate a tag if you missed something minor in a short time after the release. You can also specify with commit/object to tag, as git tag also does.

NicoHood commented 6 years ago

I will close the PR, as 1.3.1 should address your problems. If you have any new problem, let me know. I will update the AUR package now.