mirror of
https://github.com/kevinnlsamuel/bak-old.git
synced 2025-12-06 10:05:58 +05:30
improved prompt for missing deps
- newline for each dep
This commit is contained in:
@@ -15,6 +15,7 @@ set -e
|
|||||||
#####################
|
#####################
|
||||||
|
|
||||||
debug(){ ### function to call when $DEBUG is set
|
debug(){ ### function to call when $DEBUG is set
|
||||||
|
|
||||||
set -xv
|
set -xv
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,8 +84,8 @@ print_err(){
|
|||||||
print_err_deps(){
|
print_err_deps(){
|
||||||
tput setaf 1
|
tput setaf 1
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
${0##*/} has the following unmet dependencies:
|
${0##*/} has the following unmet dependencies:${1/:/
|
||||||
${1/:/\\n}
|
- }
|
||||||
EOF
|
EOF
|
||||||
tput sgr0
|
tput sgr0
|
||||||
exit 1
|
exit 1
|
||||||
@@ -187,7 +188,7 @@ for dep in $deps; do
|
|||||||
if command -v "$dep"; then
|
if command -v "$dep"; then
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
missing="${dep}:"
|
missing=":${dep}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user