mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-12-22 20:15:03 +01:00
Implemented Failed message in error function
This commit is contained in:
parent
f771e581f8
commit
3ae8777075
@ -58,7 +58,13 @@ success(){
|
||||
}
|
||||
|
||||
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
|
||||
then
|
||||
info "Calling destructor..."
|
||||
|
@ -41,12 +41,12 @@ source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh
|
||||
|
||||
info "Making mount dir..." &&
|
||||
mkdir -p /mnt/raspbian ||
|
||||
error "Failed."
|
||||
error
|
||||
|
||||
info "Mount partitions..."
|
||||
mount -o rw "$1""2" /mnt/raspbian &&
|
||||
mount -o rw "$1""1" /mnt/raspbian/boot ||
|
||||
error "Failed."
|
||||
error
|
||||
|
||||
info "Mount binds..." &&
|
||||
mount --bind /dev /mnt/raspbian/dev/ &&
|
||||
|
Loading…
Reference in New Issue
Block a user