Add error check
This commit is contained in:
parent
4ecac4a9fd
commit
9e5b6ae17b
1 changed files with 4 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ function displayYesNo {
|
||||||
function displayCmd {
|
function displayCmd {
|
||||||
echo -e "- Running $(styleColor "green")$2$(styleColorRst)..."
|
echo -e "- Running $(styleColor "green")$2$(styleColorRst)..."
|
||||||
$1 > /dev/null 2>&1
|
$1 > /dev/null 2>&1
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "\t---$(styleColor "red")Previous command failed!$(styleColorRst)---"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue