-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·55 lines (44 loc) · 1.3 KB
/
install.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.3 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
#!/bin/bash
echo "🍽️ Installing Lunch Flow → Actual Budget Importer"
echo "=================================================="
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 16+ first."
echo " Visit: https://nodejs.org/"
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 16 ]; then
echo "❌ Node.js version 16+ is required. Current version: $(node -v)"
exit 1
fi
echo "✅ Node.js $(node -v) detected"
# Check if pnpm is installed
if ! command -v pnpm &> /dev/null; then
echo "❌ pnpm is not installed. Please install pnpm first."
echo " Run: npm install -g pnpm"
echo " Or visit: https://pnpm.io/installation"
exit 1
fi
echo "✅ pnpm $(pnpm --version) detected"
# Install dependencies
echo "📦 Installing dependencies..."
pnpm install
if [ $? -ne 0 ]; then
echo "❌ Failed to install dependencies"
exit 1
fi
# Build the project
echo "🔨 Building project..."
pnpm run build
if [ $? -ne 0 ]; then
echo "❌ Failed to build project"
exit 1
fi
echo "✅ Installation complete!"
echo ""
echo "🚀 To get started, run:"
echo " pnpm start"
echo ""
echo "📖 For more information, see README.md"