X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjni%2Flibusb%2F.private%2Fpost-rewrite.sh;fp=app%2Fsrc%2Fmain%2Fjni%2Flibusb%2F.private%2Fpost-rewrite.sh;h=0ac48478417d45f5ffcfca7d9239048328bf8715;hb=831cc09829bc6e18d8d0d8bb78063e89ea565ce9;hp=0000000000000000000000000000000000000000;hpb=061580c83656bf358b01a6b78fd22ae9bd497728;p=rtmpclient.git diff --git a/app/src/main/jni/libusb/.private/post-rewrite.sh b/app/src/main/jni/libusb/.private/post-rewrite.sh new file mode 100644 index 0000000..0ac4847 --- /dev/null +++ b/app/src/main/jni/libusb/.private/post-rewrite.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Detect amended commits and warn user if .amend is missing +# +# To have git run this script on commit, create a "post-rewrite" text file in +# .git/hooks/ with the following content: +# #!/bin/sh +# if [ -x .private/post-rewrite.sh ]; then +# source .private/post-rewrite.sh +# fi +# +# NOTE: These versioning hooks are intended to be used *INTERNALLY* by the +# libusb development team and are NOT intended to solve versioning for any +# derivative branch, such as one you would create for private development. +# + +case "$1" in + amend) + # Check if a .amend exists. If none, create one and warn user to re-commit. + if [ -f .amend ]; then + rm .amend + else + echo "Amend commit detected, but no .amend file - One has now been created." + echo "Please re-commit as is (amend), so that the version number is correct." + touch .amend + fi ;; + *) ;; +esac