We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af93e9e commit e209129Copy full SHA for e209129
docker/python/entrypoint.sh
@@ -1,12 +1,27 @@
1
#!/bin/bash
2
3
-rm -f main.* output.txt runtime_error.txt
+echo "▶ Python 실행 시작"
4
+
5
+echo "📜 [main.py]"
6
+cat main.py || echo "⚠️ main.py 없음"
7
+echo
8
9
+echo "📜 [input.txt]"
10
+cat input.txt || echo "⚠️ input.txt 없음"
11
12
13
python3 main.py < input.txt > output.txt 2> runtime_error.txt
-if [ $? -ne 0 ]; then
- echo "실행 에러:"
- [ -s runtime_error.txt ] && cat runtime_error.txt
- exit 1
-fi
14
+status=$?
15
16
+echo "📄 [output.txt]"
17
+cat output.txt || echo "⚠️ output.txt 없음"
18
19
20
+echo "❌ [runtime_error.txt]"
21
+cat runtime_error.txt || echo "⚠️ runtime_error.txt 없음"
22
23
24
+# 성공했든 실패했든 결과 확인 후에 파일 삭제
25
+rm -f output.txt runtime_error.txt
26
-[ -s output.txt ] && cat output.txt
27
+exit $status
0 commit comments