Move beads tools to 9beads
This commit is contained in:
parent
5f0475c4de
commit
f87cbb7490
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
# capabilities: beads
|
||||
# description: List mounted beads projects
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
9p read beads/mtab 2>/dev/null || echo "No mounted projects"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
# capabilities: beads
|
||||
# description: Set capability level on a bead (low|standard|high)
|
||||
# Usage: set_capability.sh --mount <mount> --id <bead-id> --level <low|standard|high>
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
MOUNT=""
|
||||
BEAD_ID=""
|
||||
LEVEL=""
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--mount) MOUNT="$2"; shift 2 ;;
|
||||
--id) BEAD_ID="$2"; shift 2 ;;
|
||||
--level) LEVEL="$2"; shift 2 ;;
|
||||
*) echo "unknown argument: $1" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$MOUNT" ] || [ -z "$BEAD_ID" ] || [ -z "$LEVEL" ]; then
|
||||
echo "usage: set_capability.sh --mount <mount> --id <bead-id> --level <low|standard|high>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "set-capability $BEAD_ID $LEVEL" | 9p write beads/$MOUNT/ctl
|
||||
echo "capability set: $BEAD_ID → $LEVEL"
|
||||
Reference in New Issue