From 6a3e9283b182bbccb56c37cb613e3e31990cfb89 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 11:08:00 +0100 Subject: [PATCH] chore: added --full-install override to enable full install in mono repos --- licenses/install | 59 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/licenses/install b/licenses/install index 4feda35..fcdaf98 100755 --- a/licenses/install +++ b/licenses/install @@ -1,14 +1,33 @@ #!/bin/sh set -e +# Default mono-install to false +MONO_INSTALL=false + +# Parse command line arguments +while [ "$#" -gt 0 ]; do + case "$1" in + --mono-install) + MONO_INSTALL=true + shift + ;; + *) + echo "Unknown parameter: $1" + exit 1 + ;; + esac +done + { - echo - echo "Installing license checker engine ..." - echo + echo + echo "Installing license checker engine ..." + echo } 2>/dev/null + if [ ! -d .bin ]; then - mkdir .bin + mkdir .bin fi + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-engine.sh -o .bin/license-engine.sh chmod +x .bin/license-engine.sh curl https://raw.githubusercontent.com/ory/ci/master/licenses/licenses -o .bin/licenses @@ -16,21 +35,21 @@ chmod +x .bin/licenses curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o .bin/list-licenses chmod +x .bin/list-licenses -if [ -f go.mod ]; then - { - echo - echo "Installing the Go license checker ..." - echo - } 2>/dev/null - GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl +if [ "$MONO_INSTALL" = true ] || [ -f go.mod ]; then + { + echo + echo "Installing the Go license checker ..." + echo + } 2>/dev/null + GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl fi -if [ -f package.json ]; then - { - echo - echo "Installing the Node license checker ..." - echo - } 2>/dev/null - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json -fi +if [ "$MONO_INSTALL" = true ] || [ -f package.json ]; then + { + echo + echo "Installing the Node license checker ..." + echo + } 2>/dev/null + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json +fi \ No newline at end of file