-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·29 lines (23 loc) · 854 Bytes
/
install.sh
File metadata and controls
executable file
·29 lines (23 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -euo pipefail
REPO="mikolajrura/molecule-embeds"
TAG="latest"
FILES="main.js manifest.json styles.css RDKit_minimal.js RDKit_minimal.wasm"
# ── Find vault path ──
VAULT="${1:-}"
if [ -z "$VAULT" ]; then
echo "Usage: bash install.sh /path/to/obsidian/vault"
echo " or: bash <(curl -sL https://raw.githubusercontent.com/$REPO/master/install.sh) /path/to/vault"
exit 1
fi
PLUGIN_DIR="$VAULT/.obsidian/plugins/molecule-embeds"
mkdir -p "$PLUGIN_DIR"
# ── Download release assets ──
echo "Downloading plugin to $PLUGIN_DIR …"
BASE="https://github.com/$REPO/releases/$TAG/download"
for f in $FILES; do
printf " %-25s" "$f"
curl -sL "$BASE/$f" -o "$PLUGIN_DIR/$f" && echo "✓" || echo "✗"
done
echo ""
echo "Done. Restart Obsidian → Settings → Community plugins → enable Molecule Viewer."