-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
39 lines (32 loc) · 929 Bytes
/
setup.sh
File metadata and controls
39 lines (32 loc) · 929 Bytes
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
#!/bin/bash
echo "===================================="
echo " NewGit 2.0 Setup Installer "
echo "===================================="
# Step 1: Compile setup.c automatically
echo "Checking for setup.c..."
if [ ! -f "./setup.c" ]; then
echo "❌ Error: setup.c not found!"
echo "Please place setup.c in this directory."
exit 1
fi
echo "Compiling setup.c ..."
gcc setup.c -o setup.out -lpthread
# Check compilation success
if [ $? -ne 0 ]; then
echo "❌ Compilation failed!"
exit 1
else
echo "✔ Compilation successful!"
fi
# Step 2: Check if setup.out exists
if [ ! -f "./setup.out" ]; then
echo "❌ Error: setup.out not created!"
exit 1
fi
# Step 3: Run the setup.out installer
echo "Running setup.out..."
chmod +x setup.out
./setup.out
echo "------------------------------------"
echo " ⭐ NewGit 2.0 Installation Completed! ⭐"
echo "------------------------------------"