import {cpSync, existsSync} from 'node:fs';
import {join, resolve} from 'node:path';

const MODULE_ID = process.cwd();

const SRC = join(MODULE_ID, "/dist")
const DEST = "/home/macniel/.local/share/FoundryVTT/Data/systems/DSA_4-1"

if (existsSync(SRC)) {
    cpSync(SRC, resolve(DEST), {recursive: true})
    console.debug(`copied ${SRC} to ${DEST}`)
} else {
    console.error(`Source ${SRC} does not exists. Forgot to compile?`)
}
