added new run functions for handling dry-runs
This commit is contained in:
parent
736c767e24
commit
8059bf26ad
1 changed files with 18 additions and 0 deletions
18
install.sh
18
install.sh
|
|
@ -124,6 +124,24 @@ usage(){
|
||||||
"You must run as 'root' for this script to automatically resolve dependencies"
|
"You must run as 'root' for this script to automatically resolve dependencies"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run(){
|
||||||
|
_cmd=$@
|
||||||
|
if [[ dry_run == true ]] ; then
|
||||||
|
boxline "DryRun: $_cmd"
|
||||||
|
else
|
||||||
|
$_cmd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run-and-log(){
|
||||||
|
_cmd=$@
|
||||||
|
if [[ dry_run == true ]] ; then
|
||||||
|
logger "DryRun: $_cmd"
|
||||||
|
else
|
||||||
|
logger $_cmd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
detectvim(){
|
detectvim(){
|
||||||
# If the vim install directory exists, check for and store the highest numerical value version installed
|
# If the vim install directory exists, check for and store the highest numerical value version installed
|
||||||
if [[ -d /usr/share/vim ]] ; then
|
if [[ -d /usr/share/vim ]] ; then
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue