riju/bin/packer

18 lines
296 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "$0")/.." && echo "${PWD}")"
export PATH="$(sed -E "s_:${root}/bin:_:_; s_(^|:)${root}/bin(:|$)__" <<< "${PATH}")"
if [[ -f "${root}.env" ]]; then
set -a
. "${root}/.env"
set +a
fi
cd "${root}/packer"
exec packer "$@"