From 1d70a9c8cf1074ca548360c097cb4e851c3a718a Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Tue, 20 Oct 2026 10:22:21 +0100 Subject: [PATCH] added theme support --- scripts/export_source.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/export_source.sh b/scripts/export_source.sh index bd7fbe2..b4dd53c 100755 --- a/scripts/export_source.sh +++ b/scripts/export_source.sh @@ -1,5 +1,26 @@ -zip -r ~/Downloads/sonardesk-stylist-source.zip \ - sonar-desk-licensing \ +#!/bin/bash +set -euo pipefail + +# Determine project directory automatically +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" +PROJECT_NAME="$(basename "$PROJECT_DIR")" +PARENT_DIR="$(dirname "$PROJECT_DIR")" + +OUTPUT="$HOME/Downloads/sonardesk-stylist-source.zip" + +echo "Project: $PROJECT_DIR" +echo "Output: $OUTPUT" + +mkdir -p "$HOME/Downloads" + +# Remove previous archive +rm -f "$OUTPUT" + +# Run from parent so the project directory is included +cd "$PARENT_DIR" + +zip -r "$OUTPUT" "$PROJECT_NAME" \ -x '*/vendor/*' \ '*/node_modules/*' \ '*/.git/*' \ @@ -9,3 +30,7 @@ zip -r ~/Downloads/sonardesk-stylist-source.zip \ '*/storage/framework/cache/*' \ '*/storage/framework/sessions/*' \ '*/storage/framework/views/*' + +echo "" +echo "Export completed successfully." +ls -lh "$OUTPUT"