Compare commits
1
Commits
main
..
287cfeff7c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
287cfeff7c |
@@ -62,15 +62,15 @@ PI_EXTENSIONS=(
|
|||||||
"$FRAMEWORK_DIR/plugins/pi-automaton-tools"
|
"$FRAMEWORK_DIR/plugins/pi-automaton-tools"
|
||||||
)
|
)
|
||||||
if command -v pi &>/dev/null; then
|
if command -v pi &>/dev/null; then
|
||||||
INSTALLED_PI=true
|
|
||||||
for ext in "${PI_EXTENSIONS[@]}"; do
|
for ext in "${PI_EXTENSIONS[@]}"; do
|
||||||
ext_name=$(basename "$ext")
|
ext_name=$(basename "$ext")
|
||||||
FOUND=$(pi list 2>/dev/null | grep -c "$ext_name" || true)
|
INSTALLED=$(pi list 2>/dev/null | grep -c "$ext_name" || true)
|
||||||
if [ "$FOUND" -gt 0 ]; then
|
if [ "$INSTALLED" -gt 0 ]; then
|
||||||
echo "Pi Dev: $ext_name already installed"
|
echo "Pi Dev: $ext_name already installed"
|
||||||
else
|
else
|
||||||
echo "Pi Dev: installing $ext_name..."
|
echo "Pi Dev: installing $ext_name..."
|
||||||
pi install "$ext" 2>&1 | sed 's/^/ /'
|
pi install "$ext" 2>&1 | sed 's/^/ /'
|
||||||
|
INSTALLED_PI=true
|
||||||
echo "Pi Dev: $ext_name installed"
|
echo "Pi Dev: $ext_name installed"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -110,7 +110,7 @@ fi
|
|||||||
if ! $INSTALLED_OPENCODE && ! $INSTALLED_PI; then
|
if ! $INSTALLED_OPENCODE && ! $INSTALLED_PI; then
|
||||||
echo "No harness detected. To install a guard manually:"
|
echo "No harness detected. To install a guard manually:"
|
||||||
echo " OpenCode: add '\"plugin\": [\"$OPENCODE_SOURCE\"]' to ~/.config/opencode/opencode.json"
|
echo " OpenCode: add '\"plugin\": [\"$OPENCODE_SOURCE\"]' to ~/.config/opencode/opencode.json"
|
||||||
echo " Pi Dev: pi install $FRAMEWORK_DIR/plugins/automaton-guard-pi"
|
echo " Pi Dev: pi install $PI_SOURCE"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Without a pre-edit guard, git hooks (pre-commit + pre-push)"
|
echo "Without a pre-edit guard, git hooks (pre-commit + pre-push)"
|
||||||
echo "provide enforcement at commit/push time instead."
|
echo "provide enforcement at commit/push time instead."
|
||||||
|
|||||||
Reference in New Issue
Block a user