forked from
j4ck.xyz/tweets2bsky
A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.
1#!/bin/bash
2
3echo "🔄 Tweets-2-Bsky Updater"
4echo "========================="
5
6# Check if git is available
7if ! command -v git &> /dev/null; then
8 echo "❌ Git is not installed. Please install git to update."
9 exit 1
10fi
11
12echo "⬇️ Pulling latest changes..."
13git pull
14
15if [ $? -ne 0 ]; then
16 echo "❌ Git pull failed. You might have local changes."
17 echo " Try 'git stash' to save your changes, then run this script again."
18 exit 1
19fi
20
21echo "📦 Installing dependencies..."
22npm install
23
24if [ $? -ne 0 ]; then
25 echo "❌ npm install failed."
26 exit 1
27fi
28
29echo "🏗️ Building project..."
30npm run build
31
32if [ $? -ne 0 ]; then
33 echo "❌ Build failed."
34 exit 1
35fi
36
37echo "✅ Update complete!"
38echo "⚠️ Please restart your application service now (e.g., 'pm2 restart tweets-2-bsky' or stop and start the node process)."