Skip to content

Commit

Permalink
changing images.json location
Browse files Browse the repository at this point in the history
  • Loading branch information
pacostas authored and ForestEckhardt committed Oct 29, 2024
1 parent fdaf417 commit 2c0720e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stack/scripts/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o pipefail
readonly PROG_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly ROOT_DIR="$(cd "${PROG_DIR}/.." && pwd)"
readonly BIN_DIR="${ROOT_DIR}/.bin"
readonly IMAGES_JSON="${ROOT_DIR}/images.json"
readonly IMAGES_JSON="${ROOT_DIR}/stacks/images.json"

# shellcheck source=SCRIPTDIR/.util/tools.sh
source "${PROG_DIR}/.util/tools.sh"
Expand Down Expand Up @@ -66,7 +66,8 @@ function main() {

if [ -f "${IMAGES_JSON}" ]; then
# we need to copy images.json for inclusion in the build image
cp $IMAGES_JSON "${ROOT_DIR}/stack"
defaultStackPath=$(jq -r '.images[] | select(.name == "default") | .config_dir' "${IMAGES_JSON}")
cp $IMAGES_JSON $ROOT_DIR/$defaultStackPath/images.json
fi

# if stack or build argument is provided but not both, then throw an error
Expand Down

0 comments on commit 2c0720e

Please sign in to comment.