set up for debugging/dev

- rearranged comments around debug brace expansion so it doesn't look bad when printed due to the `-v` flag
This commit is contained in:
kevinnls
2021-03-15 13:35:39 +05:30
parent 6bb0a8c7e6
commit 0e74eacc1e
2 changed files with 24 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ set -e
##################### #####################
debug(){ ### function to call when $DEBUG is set debug(){ ### function to call when $DEBUG is set
set -xv set -xv
} }
@@ -175,9 +174,9 @@ parse_combined(){
fi fi
} }
### enable debugging ### ### enable debugging if ###
${DEBUG+debug} ### ${DEBUG+debug} ###
### if $DEBUG is set ### ### $DEBUG is set ###
############################################################################### ###############################################################################
# SANITISING PARAMS AND OPTIONS # SANITISING PARAMS AND OPTIONS

21
install.sh Normal file → Executable file
View File

@@ -6,3 +6,24 @@
# - another Linux user tired of # # - another Linux user tired of #
# type cp file file.bak # # type cp file file.bak #
################################### ###################################
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