mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
13 lines
503 B
Bash
13 lines
503 B
Bash
#!/bin/sh
|
|||
|
|
# PreToolUse: auto-approve beardrive's own setup commands so onboarding is not
|
||
|
|
# a permission gauntlet. Pure shell until the payload actually mentions bdrive,
|
||
|
|
# so the common case costs nothing; the binary makes the real decision and
|
||
|
|
# stays silent (= ask the user as usual) for anything it does not recognize.
|
||
|
|
payload=$(head -c 8192)
|
||
|
|
case "$payload" in
|
||
|
|
*bdrive*) ;;
|
||
|
|
*) exit 0 ;;
|
||
|
|
esac
|
||
|
|
command -v bdrive >/dev/null || exit 0
|
||
|
|
printf '%s' "$payload" | bdrive hook-approve 2>/dev/null || true
|