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