summarylogtreecommitdiffstats
path: root/build_environment.sh
blob: a1d26fde4bce268fc65ea2750bce45f92eaf7f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Functions for interacting with the build environment

function initialize_build_environment() {
  local directory="$1"; shift

  if [[ -z "${directory}" ]]; then
    mkdir -p "${PATH_BUILD}"
    mkarchroot -C /etc/pacman.conf "${PATH_BUILD}/root" base-devel
  else
    if [[ "${directory:0:1}" = "/" ]]; then
      mkdir -p "${directory}"
      mkarchroot -C /etc/pacman.conf "${directory}/root" base-devel
    else
      echo "Path is invalid"
    fi
  fi
}