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

31 lines
533 B
Bash

#!/bin/bash
scriptPath_file=$(dirname "${BASH_SOURCE[0]}")
scriptPath_folder=$(realpath "${scriptPath_file}")
utils_path="${scriptPath_folder}/utils"
WORKDIR=${1:-$PWD}
WORKDIR=$(realpath "$WORKDIR")
# -- VARIABLES --
# 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