Extracts common library from wild scripts.

This commit is contained in:
2025-06-28 08:18:11 -07:00
parent 0399bd54cf
commit bcccb150e3
11 changed files with 324 additions and 804 deletions

View File

@@ -1,43 +1,14 @@
#!/bin/bash
#\!/bin/bash
set -e
set -o pipefail
# Get WC_ROOT (where this script and templates live)
WC_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"
export WC_ROOT
# Source common utilities
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/wild-common.sh"
# Set up cloud directory (WC_HOME is where user's cloud will be)
WC_HOME="$(pwd)"
export WC_HOME
# Initialize Wild-Cloud environment
init_wild_env
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Helper functions
print_header() {
echo -e "\n${BLUE}=== $1 ===${NC}\n"
}
print_info() {
echo -e "${BLUE}INFO:${NC} $1"
}
print_warning() {
echo -e "${YELLOW}WARNING:${NC} $1"
}
print_success() {
echo -e "${GREEN}SUCCESS:${NC} $1"
}
print_error() {
echo -e "${RED}ERROR:${NC} $1"
}
# Usage function
usage() {