#!/bin/bash

THEME_NAME="malawy-neon-recline"

if [[ -z "$THEME_NAME" ]]; then
    echo "Theme name is empty. Exit"
    exit 1
fi

SRC="../$THEME_NAME/script.script"
DST="$SRC"

if [[ ! -f "$SRC" ]]; then
    echo "Theme script $SRC not found. Exit"
    exit 1
fi

# Проверяем наличие script.script в теме (без конвертации из JS)
cp -f "$SRC" "$DST"

if [[ $? -eq 0 ]]; then
    echo "Make succeeded: $DST updated from $SRC"
else
    echo "Make failed!"
    exit 1
fi
