24 lines
585 B
Bash
Executable File
24 lines
585 B
Bash
Executable File
#!/bin/bash
|
|
# Build the macOS Dashboard widget without duplicating code
|
|
set -euo pipefail
|
|
|
|
WIDGET_NAME="CoBiEClock"
|
|
SRC_DIR="macos-widget"
|
|
BUILD_DIR="build-widget"
|
|
|
|
# Clean build directory
|
|
rm -rf "$BUILD_DIR"
|
|
mkdir "$BUILD_DIR"
|
|
|
|
# Copy unique widget files
|
|
cp "$SRC_DIR/Info.plist" "$SRC_DIR/index.html" "$BUILD_DIR/"
|
|
|
|
# Copy shared files from repository root
|
|
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
|
|
|
|
# Create archive and rename
|
|
zip -r "${WIDGET_NAME}.zip" "$BUILD_DIR" > /dev/null
|
|
mv "${WIDGET_NAME}.zip" "${WIDGET_NAME}.wdgt"
|
|
|
|
echo "Widget created: ${WIDGET_NAME}.wdgt"
|