-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-running-code.sh
More file actions
executable file
Β·48 lines (43 loc) Β· 1.45 KB
/
check-running-code.sh
File metadata and controls
executable file
Β·48 lines (43 loc) Β· 1.45 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Quick check and fix script for your running directory
echo "=========================================="
echo "π Checking Your Running Code"
echo "=========================================="
echo ""
RUNNING_DIR="/home/nyaencha/Music/m&e/clickup-sync"
FILE="$RUNNING_DIR/backend/routes/resources.routes.js"
if [ -f "$FILE" ]; then
echo "π Found: $FILE"
echo ""
echo "π Checking for SQL parameter fix..."
echo ""
if grep -q "Math.max(1, parseInt(req.query.limit)" "$FILE"; then
echo "β
FILE IS ALREADY FIXED!"
echo ""
echo "Your file has the correct code. Just restart your server:"
echo " cd $RUNNING_DIR/backend"
echo " pm2 restart all"
else
echo "β FILE NEEDS TO BE UPDATED"
echo ""
echo "Run these commands to fix it:"
echo ""
echo " cd $RUNNING_DIR"
echo " git pull origin claude/add-finance-rename-resources-JvVp9"
echo " cd backend"
echo " pm2 restart all"
echo ""
echo "Or if you haven't committed local changes:"
echo " cd $RUNNING_DIR"
echo " git stash"
echo " git pull origin claude/add-finance-rename-resources-JvVp9"
echo " cd backend"
echo " pm2 restart all"
fi
else
echo "β File not found: $FILE"
echo ""
echo "Is your server running from a different location?"
fi
echo ""
echo "=========================================="