added a flatg to auto-reload the newly compiled script

This commit is contained in:
Luke 2023-07-22 11:27:54 -07:00
parent 958985df83
commit 26b2670602

View file

@ -69,7 +69,11 @@ echo "##################" >> $COMPILED_SRC
echo "# Reloader Script" >> $COMPILED_SRC
echo """##################
function __rebuild_bashrcd() {
bash """$SELF_SRC"""
bash \""""$SELF_SRC"""\"
if [[ \$? -eq 0 && \"\${1}\" == '-a' ]]; then
echo "Automatically loading compiled script."
source \""""$(readlink -f "$COMPILED_SRC")"""\"
fi
}
""" >> $COMPILED_SRC