1+ @ echo off
2+
3+ REM Simple script to make Embabel Agent shell scripts executable
4+ REM No complex variables - just straightforward commands
5+
6+ echo 🔧 Making Embabel Agent shell scripts executable...
7+
8+ cd ..
9+
10+ REM Check if we're in the right directory
11+ if not exist " scripts" (
12+ echo ❌ ERROR: scripts directory not found
13+ echo Please run this from the project root directory
14+ exit /b 1
15+ )
16+
17+ REM Check if in git repository
18+ git status > nul 2 >& 1
19+ if errorlevel 1 (
20+ echo ❌ ERROR: Not in a git repository
21+ exit /b 1
22+ )
23+
24+ echo .
25+ echo 📂 Processing scripts...
26+
27+ REM Process each known script individually
28+ if exist " scripts\kotlin\shell.sh" (
29+ echo Making executable: scripts/kotlin/shell.sh
30+ git update-index --chmod=+x " scripts/kotlin/shell.sh"
31+ ) else (
32+ echo ⚠️ Not found: scripts/kotlin/shell.sh
33+ )
34+
35+ if exist " scripts\kotlin\mcp_server.sh" (
36+ echo Making executable: scripts/kotlin/mcp_server.sh
37+ git update-index --chmod=+x " scripts/kotlin/mcp_server.sh"
38+ ) else (
39+ echo ⚠️ Not found: scripts/kotlin/mcp_server.sh
40+ )
41+
42+ if exist " scripts\java\shell.sh" (
43+ echo Making executable: scripts/java/shell.sh
44+ git update-index --chmod=+x " scripts/java/shell.sh"
45+ ) else (
46+ echo ⚠️ Not found: scripts/java/shell.sh
47+ )
48+
49+ if exist " scripts\java\mcp_server.sh" (
50+ echo Making executable: scripts/java/mcp_server.sh
51+ git update-index --chmod=+x " scripts/java/mcp_server.sh"
52+ ) else (
53+ echo ⚠️ Not found: scripts/java/mcp_server.sh
54+ )
55+
56+ if exist " scripts\support\agent.sh" (
57+ echo Making executable: scripts/support/agent.sh
58+ git update-index --chmod=+x " scripts/support/agent.sh"
59+ ) else (
60+ echo ⚠️ Not found: scripts/support/agent.sh
61+ )
62+
63+ if exist " scripts\support\check_env.sh" (
64+ echo Making executable: scripts/support/check_env.sh
65+ git update-index --chmod=+x " scripts/support/check_env.sh"
66+ ) else (
67+ echo ⚠️ Not found: scripts/support/check_env.sh
68+ )
69+
70+ if exist " scripts\support\shell_template.sh" (
71+ echo Making executable: scripts/support/shell_template.sh
72+ git update-index --chmod=+x " scripts/support/shell_template.sh"
73+ ) else (
74+ echo ⚠️ Not found: scripts/support/shell_template.sh
75+ )
76+
77+ echo .
78+ echo ✅ Processing complete!
79+
80+ REM Check if there are changes to commit
81+ git diff --cached --quiet
82+ if errorlevel 1 (
83+ echo .
84+ echo 📋 Scripts now marked as executable:
85+ git diff --cached --name-only
86+
87+ echo .
88+ echo 💡 Next steps:
89+ echo git commit -m " Make shell scripts executable"
90+ echo git push
91+
92+ echo .
93+ echo 🎉 Users will get executable scripts when they clone the repository!
94+ ) else (
95+ echo .
96+ echo ℹ️ All scripts were already executable - no changes needed
97+ )
98+
99+ echo .
100+ echo 🧪 Users can test with:
101+ echo cd scripts\kotlin ^ &^ & bash shell.sh --docker-tools
102+ echo cd scripts\java ^ &^ & bash shell.sh --docker-tools
0 commit comments