|
@ -13,13 +13,13 @@ function trap_error(){ |
|
|
exit $error_code |
|
|
exit $error_code |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
trap 'trap_error $? $LINENO' ERR |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function runVoid(){ |
|
|
function runVoid(){ |
|
|
|
|
|
trap - ERR |
|
|
local COMMAND="$@" |
|
|
local COMMAND="$@" |
|
|
bash -c "${COMMAND}" >/dev/null 2>&1 |
|
|
bash -c "${COMMAND}" >/dev/null 2>&1 |
|
|
|
|
|
trap 'trap_error $? $LINENO' ERR |
|
|
return $? |
|
|
return $? |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -63,6 +63,10 @@ REQUIRED_PACKAGES=( \ |
|
|
|
|
|
|
|
|
[ `id -u` -eq 0 ] && echo 'normal user required' && exit -1 |
|
|
[ `id -u` -eq 0 ] && echo 'normal user required' && exit -1 |
|
|
|
|
|
|
|
|
|
|
|
echo "# updating repositories" |
|
|
|
|
|
echo "===================" |
|
|
|
|
|
sudo apt update |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "# required packages" |
|
|
echo "# required packages" |
|
|
echo "===================" |
|
|
echo "===================" |
|
|