Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

chore: removed comments from scripts

Luigi Agostifdb77bdee437
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
index ac532849..97732a40 100755
--- a/.githooks/pre-commit
+++ b/.githooks/pre-commit
@@ -1,6 +1,4 @@
#!/bin/sh
-# Pre-commit hook: format, vet, test
-
set -e
echo "πŸ¦€ pre-commit: gofmt..."
diff --git a/scripts/check.sh b/scripts/check.sh
index 498d93d0..b7046802 100755
--- a/scripts/check.sh
+++ b/scripts/check.sh
@@ -3,11 +3,10 @@ set -e
echo "πŸ” Running pre-push checks (matches GitHub Actions CI)..."
-# Color codes for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
-NC='\033[0m' # No Color
+NC='\033[0m'
check_step() {
local step_name="$1"
@@ -25,7 +24,6 @@ error_step() {
exit 1
}
-# Step 1: Format check (exactly like CI)
check_step "Format Check"
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
@@ -36,34 +34,28 @@ if [ -n "$unformatted" ]; then
fi
success_step "Format Check"
-# Step 2: Go vet
check_step "Go Vet"
if ! go vet ./...; then
error_step "Go Vet"
fi
success_step "Go Vet"
-# Step 3: Build
check_step "Build"
if ! go build -o pinchtab .; then
error_step "Build"
fi
success_step "Build"
-# Step 4: Tests with coverage
check_step "Tests with Coverage"
if ! go test ./... -v -count=1 -coverprofile=coverage.out -covermode=atomic; then
error_step "Tests"
fi
-# Show coverage summary (like CI)
echo -e "\n${YELLOW}πŸ“Š Coverage Summary:${NC}"
go tool cover -func=coverage.out | tail -1
success_step "Tests with Coverage"
-# Step 5: Lint check (if golangci-lint is available)
check_step "Lint Check"
-# Check common locations for golangci-lint
LINT_CMD=""
if command -v golangci-lint >/dev/null 2>&1; then
LINT_CMD="golangci-lint"
@@ -83,7 +75,6 @@ else
echo -e "${YELLOW} Install with: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ~/bin v2.9.0${NC}"
fi
-# Step 6: Clean up
rm -f pinchtab coverage.out
-echo -e "\n${GREEN}πŸŽ‰ All checks passed! Ready to push.${NC}"
\ No newline at end of file
+echo -e "\n${GREEN}πŸŽ‰ All checks passed! Ready to push.${NC}"
diff --git a/scripts/install-autostart.sh b/scripts/install-autostart.sh
index a8ae5aa3..2ee18c98 100755
--- a/scripts/install-autostart.sh
+++ b/scripts/install-autostart.sh
@@ -7,30 +7,18 @@ PINCHTAB_BIN="$(cd "$SCRIPT_DIR/.." && pwd)/pinchtab"
echo "πŸ¦€ Pinchtab Auto-Start Installer"
echo "================================"
-# Detect OS
if [[ "$OSTYPE" == "darwin"* ]]; then
- # macOS
echo "Detected macOS - using launchd"
-
- # Build if needed
if [ ! -f "$PINCHTAB_BIN" ]; then
echo "Building pinchtab..."
(cd "$SCRIPT_DIR/.." && go build -o pinchtab .)
fi
-
- # Copy binary to /usr/local/bin
echo "Installing pinchtab to /usr/local/bin..."
sudo cp "$PINCHTAB_BIN" /usr/local/bin/pinchtab
-
- # Install LaunchAgent
PLIST_SRC="$SCRIPT_DIR/launchd/com.pinchtab.bridge.plist"
PLIST_DST="$HOME/Library/LaunchAgents/com.pinchtab.bridge.plist"
-
- echo "Installing LaunchAgent..."
mkdir -p "$HOME/Library/LaunchAgents"
cp "$PLIST_SRC" "$PLIST_DST"
-
- # Load the agent
echo "Loading LaunchAgent..."
launchctl load -w "$PLIST_DST" 2>/dev/null || true
@@ -45,27 +33,16 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
echo " Disable: launchctl unload ~/Library/LaunchAgents/com.pinchtab.bridge.plist"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
- # Linux
echo "Detected Linux - using systemd"
-
- # Build if needed
if [ ! -f "$PINCHTAB_BIN" ]; then
echo "Building pinchtab..."
(cd "$SCRIPT_DIR/.." && go build -o pinchtab .)
fi
-
- # Copy binary to /usr/local/bin
echo "Installing pinchtab to /usr/local/bin..."
sudo cp "$PINCHTAB_BIN" /usr/local/bin/pinchtab
-
- # Install systemd service
SERVICE_SRC="$SCRIPT_DIR/systemd/pinchtab.service"
SERVICE_DST="/etc/systemd/system/[email protected]"
-
- echo "Installing systemd service..."
sudo cp "$SERVICE_SRC" "$SERVICE_DST"
-
- # Enable and start service
echo "Enabling service for user $USER..."
sudo systemctl daemon-reload
sudo systemctl enable "pinchtab@$USER.service"
@@ -88,4 +65,4 @@ else
fi
echo ""
-echo "Test with: curl http://localhost:9867/health"
\ No newline at end of file
+echo "Test with: curl http://localhost:9867/health"
diff --git a/scripts/uninstall-autostart.sh b/scripts/uninstall-autostart.sh
index f6d15f5b..3e2fea8a 100755
--- a/scripts/uninstall-autostart.sh
+++ b/scripts/uninstall-autostart.sh
@@ -4,24 +4,19 @@ set -e
echo "πŸ¦€ Pinchtab Auto-Start Uninstaller"
echo "==================================="
-# Detect OS
if [[ "$OSTYPE" == "darwin"* ]]; then
- # macOS
echo "Detected macOS - removing launchd configuration"
PLIST="$HOME/Library/LaunchAgents/com.pinchtab.bridge.plist"
- # Unload if running
echo "Stopping Pinchtab..."
launchctl unload "$PLIST" 2>/dev/null || true
- # Remove plist
if [ -f "$PLIST" ]; then
echo "Removing LaunchAgent..."
rm "$PLIST"
fi
- # Optionally remove binary
read -p "Remove /usr/local/bin/pinchtab? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
@@ -29,22 +24,18 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
fi
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
- # Linux
echo "Detected Linux - removing systemd configuration"
- # Stop and disable service
echo "Stopping Pinchtab..."
sudo systemctl stop "pinchtab@$USER" 2>/dev/null || true
sudo systemctl disable "pinchtab@$USER" 2>/dev/null || true
- # Remove service file
if [ -f "/etc/systemd/system/[email protected]" ]; then
echo "Removing systemd service..."
sudo rm "/etc/systemd/system/[email protected]"
sudo systemctl daemon-reload
fi
- # Optionally remove binary
read -p "Remove /usr/local/bin/pinchtab? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
@@ -57,4 +48,4 @@ else
fi
echo ""
-echo "βœ… Pinchtab auto-start has been removed!"
\ No newline at end of file
+echo "βœ… Pinchtab auto-start has been removed!"