From 0b761bb2fb824390ca9845015493da294d728d44 Mon Sep 17 00:00:00 2001 From: Zedeldi <66186954+Zedeldi@users.noreply.github.com> Date: Fri, 10 Jul 2020 22:04:47 +0100 Subject: [PATCH] Added check to ensure package archive exists before installing --- monocleOS_Installer.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monocleOS_Installer.sh b/monocleOS_Installer.sh index 51a3fd1..c72fd77 100755 --- a/monocleOS_Installer.sh +++ b/monocleOS_Installer.sh @@ -116,6 +116,10 @@ if [[ $EUID -ne 0 ]]; then echo "This script must be run as root." exit 1 fi +if [ ! -e $pkgtar ]; then + echo "$pkgtar does not exist." + exit 1 +fi if [ -n "$installDisk" ]; then if (( ( $(($swapSize / 1048576)) + $rootSize + 5) > $diskSize )); then echo "Sum of partition sizes are greater than size of disk. Aborting..."