refactor: move shims from templates/ to scripts/ and drop legacy shims
- Remove 4 legacy shim files; only the unified coinhunter_shim.py remains - Move the remaining shim from templates/ to scripts/ per skill best practices - Update all docs (README, CLAUDE, shim-templates) to reference scripts/
This commit is contained in:
23
scripts/coinhunter_shim.py
Normal file
23
scripts/coinhunter_shim.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Cross-platform cron shim: delegates any coinhunter subcommand via CLI."""
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
BIN = shutil.which("coinhunter") or shutil.which("coinhunter.exe")
|
||||
if not BIN:
|
||||
print(
|
||||
"error: coinhunter CLI not found in PATH. Install with: pipx install coinhunter",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(127)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("usage: coinhunter_shim.py <subcommand> [args...]", file=sys.stderr)
|
||||
print("example: coinhunter_shim.py pre", file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
subcommand = sys.argv[1]
|
||||
args = sys.argv[2:]
|
||||
|
||||
sys.exit(subprocess.run([BIN, subcommand, *args]).returncode)
|
||||
Reference in New Issue
Block a user