Security update for Core, with self-updated composer
[yaffs-website] / vendor / consolidation / annotated-command / scenarios / install
diff --git a/vendor/consolidation/annotated-command/scenarios/install b/vendor/consolidation/annotated-command/scenarios/install
new file mode 100755 (executable)
index 0000000..e921ec0
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+SCENARIO=$1
+ACTION=${2-install}
+
+dir=scenarios/${SCENARIO}
+if [ -z "$SCENARIO" ] ; then
+  SCENARIO=default
+  dir=.
+fi
+
+
+if [ ! -d "$dir" ] ; then
+  echo "Requested scenario '${SCENARIO}' does not exist."
+  exit 1
+fi
+
+echo
+echo "::"
+echo ":: Switch to ${SCENARIO} scenario"
+echo "::"
+echo
+
+set -ex
+
+composer -n validate --working-dir=$dir --no-check-all --ansi
+composer -n --working-dir=$dir ${ACTION} --prefer-dist --no-scripts
+composer -n --working-dir=$dir info