-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·67 lines (60 loc) · 2.15 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·67 lines (60 loc) · 2.15 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# =============================================================================
# Daily Drive — Quick Installer
# =============================================================================
# Run this once to set everything up on your machine.
#
# Usage: chmod +x install.sh && ./install.sh
# =============================================================================
set -e
echo ""
echo "Daily Drive — Installer"
echo "=========================="
echo ""
# --- Check for Node.js ---
if ! command -v node &> /dev/null; then
echo "Installing Node.js..."
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
echo "Node.js installed: $(node --version)"
else
NODE_VERSION=$(node --version)
echo "Node.js found: $NODE_VERSION"
# Check minimum version (v18+)
MAJOR=$(echo "$NODE_VERSION" | sed 's/v//' | cut -d. -f1)
if [ "$MAJOR" -lt 18 ]; then
echo "WARNING: Node.js v18+ required (found $NODE_VERSION)"
echo "Update with: curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs"
exit 1
fi
fi
# --- Install dependencies ---
echo ""
echo "Installing dependencies..."
npm install
echo "Dependencies installed"
# --- Create config if needed ---
if [ ! -f config.yaml ]; then
cp config.example.yaml config.yaml
echo ""
echo "Created config.yaml from template"
echo " Edit it now: nano config.yaml"
else
echo ""
echo "config.yaml already exists"
fi
echo ""
echo "=========================="
echo "Installation complete!"
echo "=========================="
echo ""
echo "Next steps:"
echo " 1. Create a Spotify app at https://developer.spotify.com/dashboard"
echo " - Set redirect URI to: http://127.0.0.1:8888/callback"
echo " - Enable Web API and Web Playback SDK"
echo " - Add your Spotify email in Settings > User Management"
echo " 2. Edit config.yaml with your Spotify credentials and preferences"
echo " 3. Run: npm run setup (one-time Spotify login)"
echo " 4. Run: npm start (build your playlist!)"
echo " 5. Optional: Set up auto-refresh (see README.md)"
echo ""