-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·45 lines (37 loc) · 1.17 KB
/
deploy.sh
File metadata and controls
executable file
·45 lines (37 loc) · 1.17 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
#!/bin/bash
# Deploy GFN for Deck to Steam Deck over SSH
# Usage: ./deploy.sh <deck-ip>
# Example: ./deploy.sh 192.168.1.42
set -e
DECK_IP="${1}"
DECK_USER="deck"
PLUGIN_NAME="gfn-for-deck"
DEST="$DECK_USER@$DECK_IP:~/homebrew/plugins/$PLUGIN_NAME"
if [ -z "$DECK_IP" ]; then
echo "Usage: ./deploy.sh <deck-ip>"
echo "Example: ./deploy.sh 192.168.1.42"
exit 1
fi
echo "Building plugin..."
npm run build
echo ""
echo "Syncing package folder..."
cp main.py gfn-for-deck-package/main.py
cp dist/index.js gfn-for-deck-package/dist/index.js
cp plugin.json gfn-for-deck-package/plugin.json
cp defaults/gfn_games.json gfn-for-deck-package/defaults/gfn_games.json
echo ""
echo "Deploying to $DECK_USER@$DECK_IP..."
# Use sudo rsync on the remote side so we can write to the root-owned plugin folder
# Exclude macOS-compiled .so files (won't load on Linux, pure Python fallback is used)
rsync -avz --delete \
--rsync-path="sudo rsync" \
--exclude='*.darwin*.so' \
--exclude='.DS_Store' \
gfn-for-deck-package/ \
"$DEST/"
echo ""
echo "Restarting Decky plugin loader..."
ssh "$DECK_USER@$DECK_IP" "sudo systemctl restart plugin_loader"
echo ""
echo "Done! Plugin deployed to Steam Deck."