From a4885fa0600ae4e6a23f1b3b5399d90f7724b476 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 15 Aug 2021 14:44:02 +0200 Subject: [PATCH] added forced update method, do not use now (UNTESTED) --- deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index e02b3e6..6b1ba2c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -37,6 +37,9 @@ _help() { _bash_overrides() { cp -r bashrc_overrides ~/.bashrc_overrides +} + +_bashrc_ref() { echo "#REF:bashrc_overrides:REF" >> ~/.bashrc echo "if [ -f ~/.bashrc_overrides/_all ]; then" >> ~/.bashrc echo " . ~/.bashrc_overrides/_all" >> ~/.bashrc @@ -50,12 +53,15 @@ _cleanup() { _main() { _arguments "$@" - if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ] && [ "${FORCE}" = false ]; then + if [ "${FORCE}" = true ]; then + _bash_overrides + elif [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then echo "bash overrides already in place" echo "skipping..." echo else _bash_overrides + _bashrc_ref echo "bash overrides added" echo fi