From 0ded150732eb50979b2622e8891d2599fa8370a6 Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 22 Apr 2020 20:47:00 -0700 Subject: [PATCH] fixed check for bochs-x eumlator --- scripts/setup.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 811cd2e..75e73d7 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,11 +1,9 @@ #!/bin/bash -# Setup script to grab any and all dependancies needed to build this on any of my machines -bochs_=$(dpkg --list | grep bochs) -if [ "$bochs_" == "" ] -then - # install bochs shiz - sudo apt-get update - sudo apt-get install bochs "bochs-x" +[ $(id -u) -ne 0 ] && echo Must run as root && exit 0 + +dpkg -s bochs +if [ $? -ne 0 ];then + apt install bochs-x else - echo 'Nothing to install' + echo Nothing to install fi