everest-build-tools/tools/epush

23 lines
429 B
Plaintext
Raw Normal View History

2023-06-07 11:16:58 -04:00
#!/bin/sh
# Simple wrapper script around git to easily push an update
COMMIT_MSG=${1}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
printf "Checking if Git repository is present...\n"
git rev-parse --is-inside-work-tree
if [ "$?" != 0 ]; then
printf "Not a Git repository.\n"
exit 1
fi
if [ "${COMMIT_MSG}" = "" ]; then
printf "No commit message.\n"
exit 1
fi
2023-06-07 11:28:40 -04:00
git add *
2023-06-07 11:19:25 -04:00
git commit -m ${COMMIT_MSG}
2023-06-07 11:16:58 -04:00
git push origin ${BRANCH}