diff --git a/build_compiz++ b/build_compiz++ index 193db2a..4b708ab 100755 --- a/build_compiz++ +++ b/build_compiz++ @@ -4,18 +4,6 @@ # A script to build compiz++ by Scott Moreau oreaus@gmail.com # *************************************************************** -# Make sure we're being ran in bash -if [[ -z "$BASH_VERSION" ]]; then - echo "Please run this script in a bash environment." - exit 1 -fi - -# Don't run it as root -if [[ "$EUID" = 0 ]]; then - echo "Run as user, without $SUDO and not as root." - exit 1 -fi - echo echo echo "*****************************" @@ -158,7 +146,7 @@ fi # The script is designed to only use escalated permissions # when installing components if $PREFIX is outside of $HOME -if [[ $PREFIX = "$HOME"* ]]; then +if [[ $PREFIX = "$HOME"* ]] || [[ $PREFIX = "/tmp"* ]]; then unset SUDO; else SUDO="sudo -E" @@ -166,13 +154,13 @@ fi # If $SRC_DIR is anywhere other than $HOME, # assume $USER does not have write access. -if [[ $SRC_DIR != "$HOME"* ]]; then +if [[ $SRC_DIR != "$HOME"* ]] && [[ $SRC_DIR != "/tmp"* ]]; then sudo mkdir -p $SRC_DIR sudo chown $USER -R $SRC_DIR fi # Master make command -MAKE=make +MAKE=make -j4 # These are the dependencies for ubuntu. This script should work on other distributions provided the dependencies are met if echo $(python --version 2>&1)|grep -q 2.6; then