snagged the idea form the powershell script still trying to figure out pull reqs but I added This to my .bashrc and it has been updating
#inserted at line22
########### automaticaly get bash update from github ###########
# replace CTT with git username
REPO_URL="https://github.com/ChrisTitusTech/mybash.git"
BRANCH="main" #
#
# .bashrc file
BASHRC_FILE="$HOME/.bashrc"
# temp save bash file
TEMP_FILE=$(mktemp)
# grab updated bash
# replace CTT with git username
curl -sSL "https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/.bashrc" -o "$TEMP_FILE"
# repalce bash with new
if [ -s "$TEMP_FILE" ]; then
mv -f "$TEMP_FILE" "$BASHRC_FILE" # no confirm before saving
# mv "$TEMP_FILE" "$BASHRC_FILE" # will ask for confrm before saving
echo "updated .bashrc successfully."
else
echo "failed to update .bashrc."
fi
####### end of update #########
snagged the idea form the powershell script still trying to figure out pull reqs but I added This to my .bashrc and it has been updating