This commit is contained in:
Liam Waldron 2023-06-07 11:16:58 -04:00
parent 53877f7b6e
commit 377c4b0eb5
2 changed files with 48 additions and 0 deletions

20
tools/bldr/build.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
if [ $(/usr/bin/id -u) != 0 ]; then
printf "${0} must be run as root\n"
exit 1
fi
WORKING_DIR=$(pwd)
printf "parsing install.conf\n"
if [ -f "${WORKING_DIR}/install.conf" ]; then
source ${WORKING_DIR}/install.conf
else
printf "${WORKING_DIR}/install.conf does not exist\n"
exit 1
fi
case ${1} in
install)
printf "installing...\n"

28
tools/epush Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
# Simple wrapper script around git to easily push an update
COMMIT_MSG=${1}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
FILES=("${@}")
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 [ "${FILES}" = "" ]; then
printf "No files added.\n"
exit 1
fi
if [ "${COMMIT_MSG}" = "" ]; then
printf "No commit message.\n"
exit 1
fi
git add ${FILES}
git commit -m ${1}
git push origin ${BRANCH}