Updates build_git.sh script

This commit is contained in:
SebastianObi 2023-11-05 15:24:22 +01:00
parent 50fda242de
commit 2ce31fcee2

View file

@ -21,17 +21,18 @@ COMMENT_INIT="Initial commit"
_prompt() { _prompt() {
echo -e "Origin: ${ORIGIN}" echo -e "Origin: ${ORIGIN}"
echo -e "Branch: ${BRANCH}" echo -e "Branch: ${BRANCH}"
echo -e "Diff:"
git diff --numstat
echo -e "" echo -e ""
echo -e "" echo -e ""
echo -e "Select an option:" echo -e "Select an option:"
options=("Diff" "Commit/Push" "Clear History" "Init" "Init (Pull only)" "Init (Push only)" "Exit") options=("Diff" "Pull" "Commit/Push" "Clear History" "Init" "Init (Pull only)" "Init (Push only)" "Exit")
select opt in "${options[@]}"; do select opt in "${options[@]}"; do
case $opt in case $opt in
"Diff"*) "Diff"*)
_diff _diff
break;; break;;
"Pull"*)
_pull
break;;
"Commit/Push"*) "Commit/Push"*)
_commit _commit
break;; break;;
@ -71,7 +72,15 @@ _define_files() {
_diff() { _diff() {
git diff git diff --numstat
}
_pull() {
echo -e ""
echo -e "Pull"
git pull origin "${BRANCH}"
} }