-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-plugins.sh
More file actions
executable file
·29 lines (23 loc) · 1.03 KB
/
install-plugins.sh
File metadata and controls
executable file
·29 lines (23 loc) · 1.03 KB
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
#!/bin/bash
set -e # Exit on error
# Install all WordPress VS Code plugins from plugins.json
# Check if VS Code CLI is available
if ! command -v code &> /dev/null; then
echo "Error: VS Code CLI 'code' command not found."
echo ""
echo "Please install the VS Code CLI command first."
echo "See the Prerequisites section in README.md for installation instructions."
echo ""
echo "Quick setup:"
echo " - macOS: Open VS Code > Cmd+Shift+P > 'Shell Command: Install code command in PATH'"
echo " - Windows: Reinstall VS Code with 'Add to PATH' option"
echo " - Linux: Check README.md for distribution-specific instructions"
exit 1
fi
echo "Installing WordPress development VS Code plugins..."
# Read plugin IDs from plugins.json and install each one
grep '"id":' plugins.json | sed 's/.*"id": "\(.*\)".*/\1/' | while read -r plugin_id; do
echo "Installing $plugin_id..."
code --install-extension "$plugin_id" || echo "Warning: Failed to install $plugin_id"
done
echo "Plugin installation complete!"