Fix indent of function.

This commit is contained in:
2026-05-12 05:51:37 -07:00
parent d154171f33
commit c62c47dc7e
+22 -22
View File
@@ -123,7 +123,7 @@ function commit {
# Easily test this project after committing changes. # Easily test this project after committing changes.
# Otherwise can just source this file unless testing setup.sh. # Otherwise can just source this file unless testing setup.sh.
PROJECT_TERMUX="$HOME/.git-env-termux" export PROJECT_TERMUX="$HOME/.git-env-termux"
function test-termux { function test-termux {
if [[ -d "$PROJECT_TERMUX" ]]; then if [[ -d "$PROJECT_TERMUX" ]]; then
log "`date` - Updating '$PROJECT_TERMUX'.\n" log "`date` - Updating '$PROJECT_TERMUX'.\n"
@@ -147,15 +147,15 @@ alias update-termux="reload-termux "
# Pulled from /me/env-ansible, need to make a shared library between it and Termux. # Pulled from /me/env-ansible, need to make a shared library between it and Termux.
# Change a branch to point at another. # Change a branch to point at another.
function load-branch { function load-branch {
rcvr="$1" # branch which we want to modify rcvr="$1" # branch which we want to modify
base="$2" # branch with the changes we want base="$2" # branch with the changes we want
if [[ "$rcvr" == "main" ]]; then if [[ "$rcvr" == "main" ]]; then
echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***" echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***"
return 1 return 1
fi fi
if [[ -z "$base" ]]; then if [[ -z "$base" ]]; then
if [[ "$rcvr" == "prod" ]]; then if [[ "$rcvr" == "prod" ]]; then
base="stage" base="stage"
elif [[ "$rcvr" == "stage" ]]; then elif [[ "$rcvr" == "stage" ]]; then
@@ -165,22 +165,22 @@ if [[ -z "$base" ]]; then
return 1 return 1
fi fi
echo "* Base was not specified, using '$base' for '$rcvr'." echo "* Base was not specified, using '$base' for '$rcvr'."
else else
echo "* Requested pointing '$rcvr' branch to '$base'." echo "* Requested pointing '$rcvr' branch to '$base'."
fi fi
echo -e "\n* Ensuring we are on base branch '$base'." && echo -e "\n* Ensuring we are on base branch '$base'." &&
git switch "$base" && git switch "$base" &&
echo -e "\n* Changing pointer for '$rcvr' to '$base'." && echo -e "\n* Changing pointer for '$rcvr' to '$base'." &&
git branch -f "$rcvr" "$base" && git branch -f "$rcvr" "$base" &&
#echo -e "\n* Switching to branch '$rcvr'." && #echo -e "\n* Switching to branch '$rcvr'." &&
#git switch "$rcvr" && #git switch "$rcvr" &&
echo -e "\n* Forcing push on branch '$rcvr'." && echo -e "\n* Forcing push on branch '$rcvr'." &&
git push --force --set-upstream origin "$rcvr" && git push --force --set-upstream origin "$rcvr" &&
echo -e "\n* Done! Displaying list of remote branches." && echo -e "\n* Done! Displaying list of remote branches." &&
git ls-remote --heads | sort git ls-remote --heads | sort
if [[ "$base" != "dev" ]]; then if [[ "$base" != "dev" ]]; then
echo -e "\n* Checking if a dev branch exists." echo -e "\n* Checking if a dev branch exists."
git ls-remote --exit-code --heads origin dev git ls-remote --exit-code --heads origin dev
dev_exists="$?" dev_exists="$?"
@@ -193,10 +193,10 @@ if [[ "$base" != "dev" ]]; then
else else
echo "*** ERROR: Unknown status for dev_exists, '$dev_exists'. ***" echo "*** ERROR: Unknown status for dev_exists, '$dev_exists'. ***"
fi fi
fi fi
echo -e "\n* Verifying which branch we're on." echo -e "\n* Verifying which branch we're on."
git branch git branch
} }
alias load-prod="load-branch prod" alias load-prod="load-branch prod"
alias load-stage="load-branch stage" alias load-stage="load-branch stage"