diff --git a/compiler/pash.py b/compiler/pash.py index dd498f970..b52656c63 100755 --- a/compiler/pash.py +++ b/compiler/pash.py @@ -240,7 +240,6 @@ def execute_script(compiled_script_filename, command, arguments, shell_name): shell_name, " ".join(subprocess_args))) exec_obj = subprocess.run(subprocess_args, env=new_env, close_fds=False) - return exec_obj.returncode if __name__ == "__main__": diff --git a/scripts/setup-pash.sh b/scripts/setup-pash.sh index 615f74cf4..96332a3d6 100755 --- a/scripts/setup-pash.sh +++ b/scripts/setup-pash.sh @@ -11,10 +11,12 @@ if git rev-parse --git-dir > /dev/null 2>&1; then # set PASH_TOP PASH_TOP=${PASH_TOP:-$(git rev-parse --show-toplevel)} else - # we are in package mode, no .git information is available - git clone https://github.com/angelhof/libdash/ compiler/parser/libdash/ --depth 1 # set PASH_TOP to the root folder of the project if it is not available PASH_TOP=${PASH_TOP:-$PWD/..} + # remove previous installation if it exists + rm -rf $PASH_TOP/compiler/parser/libdash + # we are in package mode, no .git information is available + git clone https://github.com/angelhof/libdash/ $PASH_TOP/compiler/parser/libdash fi cd $PASH_TOP @@ -27,9 +29,9 @@ echo "Building parser..." cd compiler/parser if type lsb_release >/dev/null 2>&1 ; then - distro=$(lsb_release -i -s) + distro=$(lsb_release -i -s) elif [ -e /etc/os-release ] ; then - distro=$(awk -F= '$1 == "ID" {print $2}' /etc/os-release) + distro=$(awk -F= '$1 == "ID" {print $2}' /etc/os-release) fi echo "|-- making libdash..." @@ -37,21 +39,21 @@ echo "|-- making libdash..." distro=$(printf '%s\n' "$distro" | LC_ALL=C tr '[:upper:]' '[:lower:]') # now do different things depending on distro case "$distro" in - freebsd*) - gsed -i 's/ make/ gmake/g' Makefile - gmake libdash &> $LOG_DIR/make_libdash.log - echo "Building runtime..." - # Build runtime tools: eager, split - cd ../../runtime/ - gmake &> $LOG_DIR/make.log - ;; - *) - make libdash &> $LOG_DIR/make_libdash.log - echo "Building runtime..." - # Build runtime tools: eager, split - cd ../../runtime/ - make &> $LOG_DIR/make.log - ;; + freebsd*) + gsed -i 's/ make/ gmake/g' Makefile + gmake libdash &> $LOG_DIR/make_libdash.log + echo "Building runtime..." + # Build runtime tools: eager, split + cd ../../runtime/ + gmake &> $LOG_DIR/make.log + ;; + *) + make libdash &> $LOG_DIR/make_libdash.log + echo "Building runtime..." + # Build runtime tools: eager, split + cd ../../runtime/ + make &> $LOG_DIR/make.log + ;; esac # save distro in the init file