#!/bin/sh
# Illustrative expansion step. The application path is on a writable Pod volume.
set -eu
: "${APP_DIR:?set the application directory}"
if [ ! -d "$APP_DIR/WEB-INF" ]; then
  mkdir -p "$APP_DIR"
  (cd "$APP_DIR" && jar -xf /app/service.war)
fi
# A failed extraction can already have created WEB-INF.
# Verify release identity and completeness before reusing the tree.
