File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -euo pipefail
23
3- curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/deploy/general.env > ./env/general.env
4- curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-ca.key > ./security/root-ca.key
5- curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-ca.pem > ./security/root-ca.pem
4+ CURRENT_DIR=$( basename " $PWD " )
5+
6+ OUTPUT_DIR_PATH_PREFIX=" ../"
7+ # If we are in a "scripts" subdirectory that has a parent containing common project markers
8+ if [[ " $CURRENT_DIR " == " scripts" && ( -f ../Makefile || -f ../README.* || -d ../src || -d ../app ) ]]; then
9+ OUTPUT_DIR_PATH_PREFIX=" ../"
10+ # If we are in a project root (heuristic: has a scripts/ folder or common project files)
11+ elif [[ -d scripts || -f Makefile || -f README.* || -d src || -d app ]]; then
12+ OUTPUT_DIR_PATH_PREFIX=" ./"
13+ fi
14+
15+ curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/deploy/general.env > ${OUTPUT_DIR_PATH_PREFIX} env/general.env
16+ curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/certificates/root/root-ca.key > ${OUTPUT_DIR_PATH_PREFIX} security/root-ca.key
17+ curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/certificates/root/root-ca.pem > ${OUTPUT_DIR_PATH_PREFIX} security/root-ca.pem
You can’t perform that action at this time.
0 commit comments