You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DockerBUILDs/scripts/build.sh

29 lines
512 B
Bash

#!/bin/sh
scriptPath_file=$(dirname "${BASH_SOURCE[0]}")
scriptPath_folder=$(realpath "${scriptPath_file}")
utils_path="${scriptPath_folder}/utils"
WORKDIR=${1:-$PWD}
WORKDIR=$(realpath "$WORKDIR")
# Store original path
ORIGINALDIR=$PWD
# Get args without path
EXTRA_ARGS="${@:2}"
# Call prepare
printf "# PREPARE\n"
source ${utils_path}/prepare.sh
# Call build
printf "# BUILD\n"
build_type=${BUILD:-"ownarch"}
source ${utils_path}/build-${build_type}.sh
# Switch back to original path
cd $ORIGINALDIR