From fb675b8fe179fd0c2138ff678739d69e6f0a238f Mon Sep 17 00:00:00 2001 From: Predrag Radenkovic Date: Tue, 27 Jan 2026 10:22:55 +0100 Subject: [PATCH 1/2] Add hello world on-boarding to install script --- install.sh | 323 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 306 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index 5ef1f9a..7ec01fd 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,7 @@ GRAY_LIGHT='\033[38;2;211;211;211m' # #D3D3D3 BOLD='\033[1m' NC='\033[0m' # No Color / Reset +clear echo -e "started ${YELLOW}${BOLD}*codeplain CLI${NC} installation..." # Install uv if not present @@ -54,17 +55,36 @@ else echo -e "installing codeplain...${NC}" echo -e "" uv tool install codeplain + clear echo -e "${GREEN}✓ codeplain installed successfully!${NC}" fi -echo -e "${GREEN}✓${NC} the latest version of *codeplain CLI is now installed." -echo "" -echo -e "go to ${YELLOW}https://platform.codeplain.ai${NC} and sign up to get your API key." -echo "" -read -r -p "paste your API key here: " API_KEY < /dev/tty -echo "" +# Check if API key already exists +SKIP_API_KEY_SETUP=false +if [ -n "${CODEPLAIN_API_KEY:-}" ]; then + echo -e " you already have an API key configured." + echo "" + echo -e " would you like to log in and get a new one?" + echo "" + read -p " [y/N]: " GET_NEW_KEY /dev/null + if [ $? -ne 0 ]; then + echo -e " ${RED}✗${NC} failed to create directory: ${EXTRACT_PATH}" + echo -e " ${GRAY}skipping example download.${NC}" + DOWNLOAD_EXAMPLES="n" + fi + fi + + if [[ ! "$DOWNLOAD_EXAMPLES" =~ ^[Nn]$ ]]; then + echo -e " ${GRAY}downloading examples...${NC}" + + # Download the zip file + TEMP_ZIP=$(mktemp) + curl -L -s -o "$TEMP_ZIP" "https://github.com/Codeplain-ai/plainlang-examples/archive/refs/tags/0.1.zip" + + if [ $? -eq 0 ] && [ -s "$TEMP_ZIP" ]; then + echo -e " ${GRAY}extracting to ${EXTRACT_PATH}...${NC}" + + # Extract the zip file + unzip -q -o "$TEMP_ZIP" -d "$EXTRACT_PATH" 2>/dev/null + + if [ $? -eq 0 ]; then + # Remove the .gitignore file from the root of the extracted directory + EXTRACTED_DIR="${EXTRACT_PATH}/plainlang-examples-on-boarding" + if [ -f "${EXTRACTED_DIR}/.gitignore" ]; then + rm -f "${EXTRACTED_DIR}/.gitignore" + fi + + echo "" + echo -e " ${GREEN}✓${NC} examples downloaded successfully!" + echo "" + echo -e " examples are in: ${YELLOW}${EXTRACTED_DIR}${NC}" + echo "" + else + echo -e " ${RED}✗${NC} failed to extract examples." + fi + + # Clean up temp file + rm -f "$TEMP_ZIP" + else + echo -e " ${RED}✗${NC} failed to download examples." + rm -f "$TEMP_ZIP" + fi + + echo "" + read -p " press [Enter] to continue..." ${NC}' to get started." +echo "" +echo -e " learn more at ${YELLOW}https://plainlang.org/{NC}" +echo "" +echo -e " ${GREEN}happy development!${NC} 🚀" +echo "" From d70d807a564bd8bbab64cf1ecab950911b8fd285 Mon Sep 17 00:00:00 2001 From: Predrag Radenkovic Date: Tue, 27 Jan 2026 16:11:56 +0100 Subject: [PATCH 2/2] Split the install script into three parts --- .github/workflows/publish-install-script.yml | 19 +- install/examples.sh | 92 +++++++ install/install.sh | 228 ++++++++++++++++ install.sh => install/walkthrough.sh | 273 +------------------ 4 files changed, 347 insertions(+), 265 deletions(-) create mode 100644 install/examples.sh create mode 100755 install/install.sh rename install.sh => install/walkthrough.sh (57%) mode change 100755 => 100644 diff --git a/.github/workflows/publish-install-script.yml b/.github/workflows/publish-install-script.yml index 69f576a..6942320 100644 --- a/.github/workflows/publish-install-script.yml +++ b/.github/workflows/publish-install-script.yml @@ -1,11 +1,11 @@ -name: Publish Install Script to R2 +name: Publish Install Scripts to R2 on: push: branches: - main paths: - - 'install.sh' + - 'install/*.sh' workflow_dispatch: jobs: @@ -16,15 +16,24 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Upload install.sh to R2 + - name: Upload install scripts to R2 env: AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }} R2_BUCKET: ${{ secrets.R2_BUCKET }} run: | - aws s3 cp install.sh s3://${R2_BUCKET}/install/install.sh \ + aws s3 cp install/install.sh s3://${R2_BUCKET}/install.sh \ --endpoint-url "${R2_ENDPOINT}" \ --content-type "text/plain" - echo "✓ install.sh uploaded to R2" + + aws s3 cp install/walkthrough.sh s3://${R2_BUCKET}/walkthrough.sh \ + --endpoint-url "${R2_ENDPOINT}" \ + --content-type "text/plain" + echo "✓ walkthrough.sh uploaded to R2" + + aws s3 cp install/examples.sh s3://${R2_BUCKET}/examples.sh \ + --endpoint-url "${R2_ENDPOINT}" \ + --content-type "text/plain" + echo "✓ examples.sh uploaded to R2" diff --git a/install/examples.sh b/install/examples.sh new file mode 100644 index 0000000..54bbc34 --- /dev/null +++ b/install/examples.sh @@ -0,0 +1,92 @@ +#!/bin/bash + +set -euo pipefail + +# Brand Colors (use exported colors if available, otherwise define them) +YELLOW="${YELLOW:-\033[38;2;224;255;110m}" +GREEN="${GREEN:-\033[38;2;121;252;150m}" +RED="${RED:-\033[38;2;239;68;68m}" +GRAY="${GRAY:-\033[38;2;128;128;128m}" +BOLD="${BOLD:-\033[1m}" +NC="${NC:-\033[0m}" + +# Examples configuration +EXAMPLES_FOLDER_NAME="plainlang-examples" +EXAMPLES_DOWNLOAD_URL="https://github.com/Codeplain-ai/plainlang-examples/archive/refs/tags/0.1.zip" + +# Show current directory and ask for extraction path +CURRENT_DIR=$(pwd) +echo -e " current folder: ${YELLOW}${CURRENT_DIR}${NC}" +echo "" +echo -e " extract examples here, or enter a different path:" +echo "" +read -r -p " [Enter for current, or type path]: " EXTRACT_PATH < /dev/tty +echo "" + +# Use current directory if empty +if [ -z "${EXTRACT_PATH:-}" ]; then + EXTRACT_PATH="$CURRENT_DIR" +fi + +# Expand ~ to home directory +EXTRACT_PATH="${EXTRACT_PATH/#\~/$HOME}" + +SKIP_DOWNLOAD=false + +# Check if directory exists, create if not +if [ ! -d "$EXTRACT_PATH" ]; then + echo -e " ${GRAY}creating directory...${NC}" + mkdir -p "$EXTRACT_PATH" 2>/dev/null + if [ $? -ne 0 ]; then + echo -e " ${RED}✗${NC} failed to create directory: ${EXTRACT_PATH}" + echo -e " ${GRAY}skipping example download.${NC}" + SKIP_DOWNLOAD=true + fi +fi + +if [ "$SKIP_DOWNLOAD" = false ]; then + echo -e " ${GRAY}downloading examples...${NC}" + + # Download the zip file + TEMP_ZIP=$(mktemp) + curl -L -s -o "$TEMP_ZIP" "$EXAMPLES_DOWNLOAD_URL" + + if [ $? -eq 0 ] && [ -s "$TEMP_ZIP" ]; then + echo -e " ${GRAY}extracting to ${EXTRACT_PATH}...${NC}" + + # Extract the zip file + unzip -q -o "$TEMP_ZIP" -d "$EXTRACT_PATH" 2>/dev/null + + if [ $? -eq 0 ]; then + # Find and rename extracted directory to remove version number + EXTRACTED_DIR="${EXTRACT_PATH}/${EXAMPLES_FOLDER_NAME}" + VERSIONED_DIR=$(find "$EXTRACT_PATH" -maxdepth 1 -type d -name "${EXAMPLES_FOLDER_NAME}-*" | head -1) + if [ -n "$VERSIONED_DIR" ]; then + rm -rf "$EXTRACTED_DIR" 2>/dev/null # Remove existing if present + mv "$VERSIONED_DIR" "$EXTRACTED_DIR" + fi + + # Remove the .gitignore file from the root of the extracted directory + if [ -f "${EXTRACTED_DIR}/.gitignore" ]; then + rm -f "${EXTRACTED_DIR}/.gitignore" + fi + + echo "" + echo -e " ${GREEN}✓${NC} examples downloaded successfully!" + echo "" + echo -e " examples are in: ${YELLOW}${EXTRACTED_DIR}${NC}" + echo "" + else + echo -e " ${RED}✗${NC} failed to extract examples." + fi + + # Clean up temp file + rm -f "$TEMP_ZIP" + else + echo -e " ${RED}✗${NC} failed to download examples." + rm -f "$TEMP_ZIP" + fi + + echo "" + read -r -p " press [Enter] to continue..." < /dev/tty +fi diff --git a/install/install.sh b/install/install.sh new file mode 100755 index 0000000..e4c58df --- /dev/null +++ b/install/install.sh @@ -0,0 +1,228 @@ +#!/bin/bash + +set -euo pipefail + +# Base URL for additional scripts +CODEPLAIN_SCRIPTS_BASE_URL="${CODEPLAIN_SCRIPTS_BASE_URL:-https://codeplain.ai}" + +# Brand Colors (True Color / 24-bit) +YELLOW='\033[38;2;224;255;110m' # #E0FF6E +GREEN='\033[38;2;121;252;150m' # #79FC96 +GREEN_LIGHT='\033[38;2;197;220;217m' # #C5DCD9 +GREEN_DARK='\033[38;2;34;57;54m' # #223936 +BLUE='\033[38;2;10;31;212m' # #0A1FD4 +BLACK='\033[38;2;26;26;26m' # #1A1A1A +WHITE='\033[38;2;255;255;255m' # #FFFFFF +RED='\033[38;2;239;68;68m' # #EF4444 +GRAY='\033[38;2;128;128;128m' # #808080 +GRAY_LIGHT='\033[38;2;211;211;211m' # #D3D3D3 +BOLD='\033[1m' +NC='\033[0m' # No Color / Reset + +# Export colors for child scripts +export YELLOW GREEN GREEN_LIGHT GREEN_DARK BLUE BLACK WHITE RED GRAY GRAY_LIGHT BOLD NC + +clear +echo -e "started ${YELLOW}${BOLD}*codeplain CLI${NC} installation..." + +# Install uv if not present +install_uv() { + echo -e "installing uv package manager..." + curl -LsSf https://astral.sh/uv/install.sh | sh + # Add uv to PATH for this session + export PATH="$HOME/.local/bin:$PATH" +} + +# Check if uv is installed +if ! command -v uv &> /dev/null; then + echo -e "${GRAY}uv is not installed.${NC}" + install_uv + echo -e "${GREEN}✓${NC} uv installed successfully" + echo -e "" +fi + +echo -e "${GREEN}✓${NC} uv detected" +echo -e "" + +# Install or upgrade codeplain using uv tool +if uv tool list 2>/dev/null | grep -q "^codeplain"; then + CURRENT_VERSION=$(uv tool list 2>/dev/null | grep "^codeplain" | sed 's/codeplain v//') + echo -e "${GRAY}codeplain ${CURRENT_VERSION} is already installed.${NC}" + echo -e "upgrading to latest version..." + echo -e "" + uv tool upgrade codeplain &> /dev/null + NEW_VERSION=$(uv tool list 2>/dev/null | grep "^codeplain" | sed 's/codeplain v//') + if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then + echo -e "${GREEN}✓${NC} codeplain is already up to date (${NEW_VERSION})" + else + echo -e "${GREEN}✓${NC} codeplain upgraded from ${CURRENT_VERSION} to ${NEW_VERSION}!" + fi +else + echo -e "installing codeplain...${NC}" + echo -e "" + uv tool install codeplain + clear + echo -e "${GREEN}✓ codeplain installed successfully!${NC}" +fi + +# Check if API key already exists +SKIP_API_KEY_SETUP=false +if [ -n "${CODEPLAIN_API_KEY:-}" ]; then + echo -e " you already have an API key configured." + echo "" + echo -e " would you like to log in and get a new one?" + echo "" + read -r -p " [y/N]: " GET_NEW_KEY < /dev/tty + echo "" + + if [[ ! "$GET_NEW_KEY" =~ ^[Yy]$ ]]; then + echo -e "${GREEN}✓${NC} using existing API key." + SKIP_API_KEY_SETUP=true + fi +fi + +if [ "$SKIP_API_KEY_SETUP" = false ]; then + echo -e "go to ${YELLOW}https://platform.codeplain.ai${NC} and sign up to get your API key." + echo "" + read -r -p "paste your API key here: " API_KEY < /dev/tty + echo "" +fi + +if [ "$SKIP_API_KEY_SETUP" = true ]; then + : # API key already set, nothing to do +elif [ -z "${API_KEY:-}" ]; then + echo -e "${GRAY}no API key provided. you can set it later with:${NC}" + echo -e " export CODEPLAIN_API_KEY=\"your_api_key\"" +else + # Export for current session + export CODEPLAIN_API_KEY="$API_KEY" + + # Detect user's default shell from $SHELL (works even when script runs in different shell) + case "$SHELL" in + */zsh) + SHELL_RC="$HOME/.zshrc" + ;; + */bash) + SHELL_RC="$HOME/.bashrc" + ;; + *) + SHELL_RC="$HOME/.profile" + ;; + esac + + # Create the file if it doesn't exist + touch "$SHELL_RC" + + # Add to shell config if not already present + if ! grep -q "CODEPLAIN_API_KEY" "$SHELL_RC" 2>/dev/null; then + echo "" >> "$SHELL_RC" + echo "# codeplain API Key" >> "$SHELL_RC" + echo "export CODEPLAIN_API_KEY=\"$API_KEY\"" >> "$SHELL_RC" + echo -e "${GREEN}✓ API key saved to ${SHELL_RC}${NC}" + else + # Update existing key (different sed syntax for macOS vs Linux) + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "s|export CODEPLAIN_API_KEY=.*|export CODEPLAIN_API_KEY=\"$API_KEY\"|" "$SHELL_RC" + else + sed -i "s|export CODEPLAIN_API_KEY=.*|export CODEPLAIN_API_KEY=\"$API_KEY\"|" "$SHELL_RC" + fi + fi +fi + +# ASCII Art Welcome +clear +echo "" +echo -e "${NC}" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo -e "" +cat << 'EOF' + _ _ _ + ___ ___ __| | ___ _ __ | | __ _(_)_ __ + / __/ _ \ / _` |/ _ \ '_ \| |/ _` | | '_ \ + | (_| (_) | (_| | __/ |_) | | (_| | | | | | + \___\___/ \__,_|\___| .__/|_|\__,_|_|_| |_| + |_| +EOF +echo "" +echo -e "${GREEN}✓${NC} Sign in successful." +echo "" +echo -e " ${YELLOW}welcome to *codeplain!${NC}" +echo "" +echo -e " spec-driven, production-ready code generation" +echo "" +echo "" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo "" +echo -e " would you like to get a quick intro to ***plain specification language?" +echo "" +read -r -p " [Y/n]: " WALKTHROUGH_CHOICE < /dev/tty +echo "" + +# Determine script directory for local execution +SCRIPT_DIR="" +if [ -n "${BASH_SOURCE[0]:-}" ] && [ -f "${BASH_SOURCE[0]}" ]; then + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +fi + +# Helper function to run a script (local or remote) +run_script() { + local script_name="$1" + local script_path="" + + # Check possible local paths + if [ -n "$SCRIPT_DIR" ] && [ -f "${SCRIPT_DIR}/${script_name}" ]; then + script_path="${SCRIPT_DIR}/${script_name}" + elif [ -f "./install/${script_name}" ]; then + script_path="./install/${script_name}" + elif [ -f "./${script_name}" ]; then + script_path="./${script_name}" + fi + + if [ -n "$script_path" ]; then + # Run locally + bash "$script_path" < /dev/tty + else + # Download and run + bash <(curl -fsSL "${CODEPLAIN_SCRIPTS_BASE_URL}/${script_name}") < /dev/tty + fi +} + +# Run walkthrough if user agrees +if [[ ! "$WALKTHROUGH_CHOICE" =~ ^[Nn]$ ]]; then + run_script "walkthrough.sh" +fi + +# Download examples step +clear +echo "" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo -e " ${YELLOW}${BOLD}Example Projects${NC}" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo "" +echo -e " we've prepared some example Plain projects for you" +echo -e " to explore and experiment with." +echo "" +echo -e " would you like to download them?" +echo "" +read -r -p " [Y/n]: " DOWNLOAD_EXAMPLES < /dev/tty +echo "" + +# Run examples download if user agrees +if [[ ! "${DOWNLOAD_EXAMPLES:-}" =~ ^[Nn]$ ]]; then + run_script "examples.sh" +fi + +# Final message +clear +echo "" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo -e " ${YELLOW}${BOLD}You're all set!${NC}" +echo -e "${GRAY}────────────────────────────────────────────${NC}" +echo "" +echo -e " thank you for using *codeplain!" +echo "" +echo "" +echo -e " learn more at ${YELLOW}https://plainlang.org/${NC}" +echo "" +echo -e " ${GREEN}happy development!${NC} 🚀" +echo "" diff --git a/install.sh b/install/walkthrough.sh old mode 100755 new mode 100644 similarity index 57% rename from install.sh rename to install/walkthrough.sh index 7ec01fd..6817133 --- a/install.sh +++ b/install/walkthrough.sh @@ -2,164 +2,19 @@ set -euo pipefail -# Brand Colors (True Color / 24-bit) -YELLOW='\033[38;2;224;255;110m' # #E0FF6E -GREEN='\033[38;2;121;252;150m' # #79FC96 -GREEN_LIGHT='\033[38;2;197;220;217m' # #C5DCD9 -GREEN_DARK='\033[38;2;34;57;54m' # #223936 -BLUE='\033[38;2;10;31;212m' # #0A1FD4 -BLACK='\033[38;2;26;26;26m' # #1A1A1A -WHITE='\033[38;2;255;255;255m' # #FFFFFF -RED='\033[38;2;239;68;68m' # #EF4444 -GRAY='\033[38;2;128;128;128m' # #808080 -GRAY_LIGHT='\033[38;2;211;211;211m' # #D3D3D3 -BOLD='\033[1m' -NC='\033[0m' # No Color / Reset - -clear -echo -e "started ${YELLOW}${BOLD}*codeplain CLI${NC} installation..." - -# Install uv if not present -install_uv() { - echo -e "installing uv package manager..." - curl -LsSf https://astral.sh/uv/install.sh | sh - # Add uv to PATH for this session - export PATH="$HOME/.local/bin:$PATH" -} - -# Check if uv is installed -if ! command -v uv &> /dev/null; then - echo -e "${GRAY}uv is not installed.${NC}" - install_uv - echo -e "${GREEN}✓${NC} uv installed successfully" - echo -e "" -fi - -echo -e "${GREEN}✓${NC} uv detected" -echo -e "" - -# Install or upgrade codeplain using uv tool -if uv tool list 2>/dev/null | grep -q "^codeplain"; then - CURRENT_VERSION=$(uv tool list 2>/dev/null | grep "^codeplain" | sed 's/codeplain v//') - echo -e "${GRAY}codeplain ${CURRENT_VERSION} is already installed.${NC}" - echo -e "upgrading to latest version..." - echo -e "" - uv tool upgrade codeplain &> /dev/null - NEW_VERSION=$(uv tool list 2>/dev/null | grep "^codeplain" | sed 's/codeplain v//') - if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then - echo -e "${GREEN}✓${NC} codeplain is already up to date (${NEW_VERSION})" - else - echo -e "${GREEN}✓${NC} codeplain upgraded from ${CURRENT_VERSION} to ${NEW_VERSION}!" - fi -else - echo -e "installing codeplain...${NC}" - echo -e "" - uv tool install codeplain - clear - echo -e "${GREEN}✓ codeplain installed successfully!${NC}" -fi - -# Check if API key already exists -SKIP_API_KEY_SETUP=false -if [ -n "${CODEPLAIN_API_KEY:-}" ]; then - echo -e " you already have an API key configured." - echo "" - echo -e " would you like to log in and get a new one?" - echo "" - read -p " [y/N]: " GET_NEW_KEY /dev/null; then - echo "" >> "$SHELL_RC" - echo "# codeplain API Key" >> "$SHELL_RC" - echo "export CODEPLAIN_API_KEY=\"$API_KEY\"" >> "$SHELL_RC" - echo -e "${GREEN}✓ API key saved to ${SHELL_RC}${NC}" - else - # Update existing key (different sed syntax for macOS vs Linux) - if [[ "$OSTYPE" == "darwin"* ]]; then - sed -i '' "s|export CODEPLAIN_API_KEY=.*|export CODEPLAIN_API_KEY=\"$API_KEY\"|" "$SHELL_RC" - else - sed -i "s|export CODEPLAIN_API_KEY=.*|export CODEPLAIN_API_KEY=\"$API_KEY\"|" "$SHELL_RC" - fi - fi -fi - -# ASCII Art Welcome -clear -echo "" -echo -e "${NC}" -echo -e "${GRAY}────────────────────────────────────────────${NC}" -echo -e "" -cat << 'EOF' - _ _ _ - ___ ___ __| | ___ _ __ | | __ _(_)_ __ - / __/ _ \ / _` |/ _ \ '_ \| |/ _` | | '_ \ - | (_| (_) | (_| | __/ |_) | | (_| | | | | | - \___\___/ \__,_|\___| .__/|_|\__,_|_|_| |_| - |_| -EOF -echo "" -echo -e "${GREEN}✓${NC} Sign in successful." -echo "" -echo -e " ${YELLOW}welcome to *codeplain!${NC}" -echo "" -echo -e " spec-driven, production-ready code generation" -echo "" -echo "" -echo -e "${GRAY}────────────────────────────────────────────${NC}" -echo "" -echo -e " would you like to get a quick intro to ***plain specification language?" -echo "" -read -p " [Y/n]: " WALKTHROUGH_CHOICE /dev/null - if [ $? -ne 0 ]; then - echo -e " ${RED}✗${NC} failed to create directory: ${EXTRACT_PATH}" - echo -e " ${GRAY}skipping example download.${NC}" - DOWNLOAD_EXAMPLES="n" - fi - fi - - if [[ ! "$DOWNLOAD_EXAMPLES" =~ ^[Nn]$ ]]; then - echo -e " ${GRAY}downloading examples...${NC}" - - # Download the zip file - TEMP_ZIP=$(mktemp) - curl -L -s -o "$TEMP_ZIP" "https://github.com/Codeplain-ai/plainlang-examples/archive/refs/tags/0.1.zip" - - if [ $? -eq 0 ] && [ -s "$TEMP_ZIP" ]; then - echo -e " ${GRAY}extracting to ${EXTRACT_PATH}...${NC}" - - # Extract the zip file - unzip -q -o "$TEMP_ZIP" -d "$EXTRACT_PATH" 2>/dev/null - - if [ $? -eq 0 ]; then - # Remove the .gitignore file from the root of the extracted directory - EXTRACTED_DIR="${EXTRACT_PATH}/plainlang-examples-on-boarding" - if [ -f "${EXTRACTED_DIR}/.gitignore" ]; then - rm -f "${EXTRACTED_DIR}/.gitignore" - fi - - echo "" - echo -e " ${GREEN}✓${NC} examples downloaded successfully!" - echo "" - echo -e " examples are in: ${YELLOW}${EXTRACTED_DIR}${NC}" - echo "" - else - echo -e " ${RED}✗${NC} failed to extract examples." - fi - - # Clean up temp file - rm -f "$TEMP_ZIP" - else - echo -e " ${RED}✗${NC} failed to download examples." - rm -f "$TEMP_ZIP" - fi - - echo "" - read -p " press [Enter] to continue..."