forked from StemCenterGU/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-mac.sh
More file actions
executable file
·47 lines (38 loc) · 1.41 KB
/
Copy pathsetup-mac.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.41 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
#!/usr/bin/env bash
# --- Check for Homebrew and install if missing ---
if ! command -v brew &> /dev/null
then
echo "Homebrew not found. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# After installing, you might need to add Homebrew to PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# --- Install Node.js (LTS), Git, PostgreSQL, and VS Code ---
echo "Installing Node.js, Git, PostgreSQL, and VS Code..."
brew install node git postgresql
brew install --cask visual-studio-code
# Start PostgreSQL (or prompt user to configure it manually)
brew services start postgresql
# --- Clone the GitHub repo ---
REPO_URL="https://github.com/CodeWithInferno/notes.git"
PROJECT_DIR="uni-anotes"
if [ ! -d "$PROJECT_DIR" ]; then
echo "Cloning project from $REPO_URL"
git clone "$REPO_URL" "$PROJECT_DIR"
else
echo "Project folder already exists. Pulling latest changes..."
cd "$PROJECT_DIR"
git pull
cd ..
fi
# --- Install dependencies & run setup commands ---
cd "$PROJECT_DIR" || exit
echo "Installing project dependencies with npm..."
npm install
# If you have Prisma migrations or similar:
# npx prisma migrate dev
echo "All set! You can now run the development server with:"
echo "cd $PROJECT_DIR && npm run dev"
echo "Opening project in VS Code..."
code .