nauppece_timemeter/deploy.sh
nauppece 561337b841 chore: make deploy.sh portable (no hardcoded personal path)
deploy.sh now reads the destination from TIMEMETER_PLUGIN_DIR (optionally
via a gitignored deploy.local.sh) instead of a hardcoded absolute path.
This removes the machine-specific path and works for any contributor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 09:06:54 +09:00

19 lines
710 B
Bash
Executable file

#!/bin/zsh
set -e
# Deploy the built plugin files to your Obsidian vault's plugin folder.
#
# Set the destination via the TIMEMETER_PLUGIN_DIR environment variable, e.g.:
# export TIMEMETER_PLUGIN_DIR="/path/to/YourVault/.obsidian/plugins/timemeter"
#
# For convenience you can put that line in a local, gitignored `deploy.local.sh`
# next to this script; it will be sourced automatically.
here="$(cd "$(dirname "$0")" && pwd)"
[ -f "$here/deploy.local.sh" ] && source "$here/deploy.local.sh"
DEST="${TIMEMETER_PLUGIN_DIR:?Set TIMEMETER_PLUGIN_DIR to your vault's .obsidian/plugins/timemeter (see deploy.sh header)}"
mkdir -p "$DEST"
cp main.js manifest.json styles.css "$DEST/"
echo "deployed to $DEST"