2021-07-05 23:15:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
## make_patch Creates patch file with the current changes.
|
|
|
|
##
|
|
|
|
## Copyright (c) 2014-2021 Sylvain Benner & Contributors
|
|
|
|
##
|
|
|
|
## Author: Eugene Yaremenko
|
|
|
|
## URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
##
|
|
|
|
## This file is not part of GNU Emacs.
|
|
|
|
##
|
|
|
|
## License: GPLv3
|
|
|
|
|
2021-07-07 10:25:03 +00:00
|
|
|
if [[ -z "$(git status --porcelain)" ]]; then
|
2021-07-05 23:15:33 +00:00
|
|
|
git diff HEAD > "/tmp/${PUBLISH}.patch"
|
2021-07-07 10:25:03 +00:00
|
|
|
echo "Changed files:"
|
|
|
|
git status --porcelain
|
|
|
|
echo "============================"
|
|
|
|
echo "Patch:"
|
|
|
|
cat "/tmp/${PUBLISH}.patch"
|
|
|
|
echo "============================"
|
|
|
|
else
|
|
|
|
echo "No changes. Exiting."
|
|
|
|
exit 0
|
2021-07-05 23:15:33 +00:00
|
|
|
fi
|