mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-26 00:41:04 +01:00
Implemented Failed message in error function
This commit is contained in:
parent
f771e581f8
commit
3ae8777075
@ -58,7 +58,13 @@ success(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
error(){
|
error(){
|
||||||
message "${COLOR_RED}" "ERROR" "$1 -> Leaving program."
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
message="Failed."
|
||||||
|
else
|
||||||
|
message="$1"
|
||||||
|
fi
|
||||||
|
message "${COLOR_RED}" "ERROR" "$message -> Leaving program."
|
||||||
if declare -f "destructor" > /dev/null
|
if declare -f "destructor" > /dev/null
|
||||||
then
|
then
|
||||||
info "Calling destructor..."
|
info "Calling destructor..."
|
||||||
|
@ -41,12 +41,12 @@ source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh
|
|||||||
|
|
||||||
info "Making mount dir..." &&
|
info "Making mount dir..." &&
|
||||||
mkdir -p /mnt/raspbian ||
|
mkdir -p /mnt/raspbian ||
|
||||||
error "Failed."
|
error
|
||||||
|
|
||||||
info "Mount partitions..."
|
info "Mount partitions..."
|
||||||
mount -o rw "$1""2" /mnt/raspbian &&
|
mount -o rw "$1""2" /mnt/raspbian &&
|
||||||
mount -o rw "$1""1" /mnt/raspbian/boot ||
|
mount -o rw "$1""1" /mnt/raspbian/boot ||
|
||||||
error "Failed."
|
error
|
||||||
|
|
||||||
info "Mount binds..." &&
|
info "Mount binds..." &&
|
||||||
mount --bind /dev /mnt/raspbian/dev/ &&
|
mount --bind /dev /mnt/raspbian/dev/ &&
|
||||||
|
Loading…
Reference in New Issue
Block a user