Spaces:
Build error
Build error
Create scripts/setup.sh
Browse files- scripts/setup.sh +24 -0
scripts/setup.sh
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
echo "⏳ Starting setup..."
|
| 4 |
+
|
| 5 |
+
# Step 1: Install GnuCOBOL if not installed
|
| 6 |
+
if ! command -v cobc >/dev/null 2>&1; then
|
| 7 |
+
echo "🔧 Installing GnuCOBOL..."
|
| 8 |
+
apt-get update && apt-get install -y gnucobol
|
| 9 |
+
fi
|
| 10 |
+
|
| 11 |
+
# Step 2: Compile COBOL programs
|
| 12 |
+
cd cobol || { echo "❌ Failed to enter cobol directory"; exit 1; }
|
| 13 |
+
|
| 14 |
+
echo "⚙️ Compiling COBOL programs..."
|
| 15 |
+
cobc -x account.cbl
|
| 16 |
+
cobc -x loan.cbl
|
| 17 |
+
|
| 18 |
+
# Step 3: Make sure they're executable
|
| 19 |
+
chmod +x account loan
|
| 20 |
+
|
| 21 |
+
# Step 4: List what was created
|
| 22 |
+
ls -l account loan
|
| 23 |
+
|
| 24 |
+
echo "✅ Setup complete!"
|