Error handling update
This commit is contained in:
parent
121be8565a
commit
0a4abf7527
4 changed files with 32 additions and 0 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
source ./restore.lib.bash
|
source ./restore.lib.bash
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Failed to source restore.lib.bash"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
function cprint () {
|
function cprint () {
|
||||||
color="$1"
|
color="$1"
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
source ./restore.lib.bash
|
source ./restore.lib.bash
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Failed to source restore.lib.bash"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
# we call cp directly and check for a cp alias
|
# we call cp directly and check for a cp alias
|
||||||
cpapp=$(which cp)
|
cpapp=$(which cp)
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
source ./restore.lib.bash
|
source ./restore.lib.bash
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Failed to source restore.lib.bash"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
function cprint () {
|
function cprint () {
|
||||||
color="$1"
|
color="$1"
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -12,8 +12,21 @@ fi
|
||||||
|
|
||||||
# Check the OS, it sets a env variable as a result
|
# Check the OS, it sets a env variable as a result
|
||||||
source ./os_probe.bash
|
source ./os_probe.bash
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Failed to source os_probe.bash"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source ./check.bash
|
source ./check.bash
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Failed to source check.bash"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
pkgsum="pkgsum"
|
pkgsum="pkgsum"
|
||||||
hashapp="sha256sum"
|
hashapp="sha256sum"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue