From 0e74eacc1e3bf52ca0b8c39e9892602a0203c742 Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Mon, 15 Mar 2021 13:35:39 +0530 Subject: [PATCH] set up for debugging/dev - rearranged comments around debug brace expansion so it doesn't look bad when printed due to the `-v` flag --- bak-old.sh | 5 ++--- install.sh | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) mode change 100644 => 100755 install.sh diff --git a/bak-old.sh b/bak-old.sh index 21f59ed..525720f 100755 --- a/bak-old.sh +++ b/bak-old.sh @@ -15,7 +15,6 @@ set -e ##################### debug(){ ### function to call when $DEBUG is set - set -xv } @@ -175,9 +174,9 @@ parse_combined(){ fi } -### enable debugging ### +### enable debugging if ### ${DEBUG+debug} ### -### if $DEBUG is set ### +### $DEBUG is set ### ############################################################################### # SANITISING PARAMS AND OPTIONS diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 32616a1..6afc405 --- a/install.sh +++ b/install.sh @@ -5,4 +5,25 @@ # authored by github.com/kevinnls # # - another Linux user tired of # # type cp file file.bak # -################################### \ No newline at end of file +################################### + +work_dir=/tmp/bak-old_installation/ + +debug(){ ### function to call when $DEBUG is set + set -xv +} + + +### enable debugging if ### +${DEBUG+debug} ### +### $DEBUG is set ### + +# create dir for installation work + +mkdir -p $work_dir +cd $work_dir + +# cleanup + +cd $HOME +rm -rf $work_dir \ No newline at end of file