mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
builder organizational tweaks
This commit is contained in:
+14
-17
@@ -1,22 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to get a directory using fzf
|
||||
get_directory() {
|
||||
# List all directories in the current directory that don't start with an underscore
|
||||
local directories
|
||||
directories=$(find . -maxdepth 1 -type d -not -name '_*' -exec basename {} \; | grep -v '[_\.]' | sort -r)
|
||||
# List all directories in the current directory that don't start with an underscore
|
||||
directories
|
||||
directories=$(find . -maxdepth 1 -type d -not -name '_*' -exec basename {} \; | grep -v '[_\.]' | sort -r)
|
||||
|
||||
# Use fzf to allow the user to select a directory
|
||||
local selected_dir
|
||||
selected_dir=$(echo "$directories" | fzf --prompt="Select a directory: ")
|
||||
# Use fzf to allow the user to select a directory
|
||||
selected_dir
|
||||
selected_dir=$(echo "$directories" | fzf --prompt="Select a directory: ")
|
||||
|
||||
# Check if a directory was selected
|
||||
if [[ -z "$selected_dir" ]]; then
|
||||
echo "No directory selected."
|
||||
return 1
|
||||
fi
|
||||
# Check if a directory was selected
|
||||
if [[ -z "$selected_dir" ]]; then
|
||||
echo "No directory selected."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Set the BLDR_DIR variable to the selected directory
|
||||
BLDR_DIR="${BLDR_PARENT_PATH}/${selected_dir}"
|
||||
BLDR_APP=${selected_dir}
|
||||
}
|
||||
# Set the BLDR_DIR variable to the selected directory
|
||||
BLDR_DIR="${BLDR_PARENT_PATH}/${selected_dir}"
|
||||
BLDR_APP=${selected_dir}
|
||||
|
||||
@@ -13,6 +13,13 @@ generate_readme() {
|
||||
readme_content+="# $BLDR_APP\n\n"
|
||||
readme_content+="Last Updated: $UPDATED\n\n"
|
||||
|
||||
# Overview
|
||||
readme_content+="## Overview\n"
|
||||
readme_content+="Docker Hub: \n"
|
||||
readme_content+="Project: \n"
|
||||
readme_content+="Composer Example: \n"
|
||||
readme_content+="Proxy Port: \n"
|
||||
|
||||
# Description
|
||||
readme_content+="## Description\n"
|
||||
readme_content+="$DESCRIPTION\n\n"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
BLDR_ENV_FILE+="# $BLDR_APP\n"
|
||||
BLDR_ENV_FILE+="COOKBOOK=$BLDR_PARENT_PATH #HELP: cookbooks\n"
|
||||
BLDR_ENV_FILE+="COOKBOOK=/git/docker-compose-cookbooks #HELP: cookbooks\n"
|
||||
|
||||
while IFS= read -r line; do
|
||||
# Use a regex to match and extract variable names and defaults
|
||||
|
||||
Reference in New Issue
Block a user