#!/bin/bash
set -e
echo "🚀 Starting Social Media Data Collection System Installation..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
OS="linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
OS="macos"
else
echo "❌ Unsupported OS"
exit 1
fi
if ! command -v go &> /dev/null; then
if [[ "$OS" == "linux" ]]; then
sudo apt update
sudo apt install -y golang-go
elif [[ "$OS" == "macos" ]]; then
brew install go
fi
fi
if [[ "$OS" == "linux" ]]; then
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update
sudo apt install -y google-chrome-stable
elif [[ "$OS" == "macos" ]]; then
brew install --cask google-chrome
fi
go install github.com/chromedp/chromedp@latest
go install github.com/gin-gonic/gin@latest
go install github.com/gorilla/websocket@latest
go …