-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·49 lines (34 loc) · 1.05 KB
/
init.sh
File metadata and controls
executable file
·49 lines (34 loc) · 1.05 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
#!/bin/bash
echo "Initializing repositories..."
if [ ! -d "./ferrum/.git" ]; then
echo "Ferrum not found, cloning..."
rm -r ferrum
git clone https://github.com/Geplauder/ferrum.git ferrum
echo "Ferrum cloned successfully, initializing database..."
cd ./ferrum/ferrum-db/
sqlx database create
sqlx migrate run
echo "Ferrum database initialized."
cd ../..
echo "Successfully initialized Ferrum."
else
echo "Found existing Ferrum directory, skipping..."
fi
if [ ! -d "./oxygen/.git" ]; then
echo "Oxygen not found, cloning..."
rm -r oxygen
git clone https://github.com/Geplauder/oxygen.git oxygen
echo "Oxygen cloned successfully, installing npm packages..."
cd ./oxygen
npm i
cp /workspace/.env.oxygen .env.local
echo "Oxygen npm packages successfully installed."
cd ./..
echo "Successfully initialized Oxygen."
else
echo "Found existing Oxygen directory, skipping..."
fi
echo "Fixing cargo permissions..."
sudo chmod -R g+rw /usr/local/cargo
echo "Cargo permissions fixed."
echo "Repositories successfully initialized"