Skip to content

Commit 93a22a9

Browse files
RafaelZeziliajuliolmuller
authored andcommitted
Definindo chmod +x nos arquivos .sh
Definindo chmod +x nos arquivos .sh
1 parent ba955c8 commit 93a22a9

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

scripts/java/compile.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/bash
2-
3-
# BASE_DIR - base directory for the untrusty scripts
4-
# SRC_FILE - BASE_DUR plus the name of the text file where the source code resides
5-
# BIN_FILE - BASE_DUR plus the name of the file that will execute the program resides
6-
# INPUT_FILE - BASE_DUR plus the name of the file that will be used as input for the program
7-
8-
javac "${SRC_FILE}"
1+
#!/bin/bash
2+
3+
# BASE_DIR - base directory for the untrusty scripts
4+
# SRC_FILE - BASE_DUR plus the name of the text file where the source code resides
5+
# BIN_FILE - BASE_DUR plus the name of the file that will execute the program resides
6+
# INPUT_FILE - BASE_DUR plus the name of the file that will be used as input for the program
7+
8+
javac "${SRC_FILE}"

scripts/java/execute.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#!/bin/bash
2-
3-
# BASE_DIR - base directory for the untrusty scripts
4-
# SRC_FILE - BASE_DUR plus the name of the text file where the source code resides
5-
# BIN_FILE - BASE_DUR plus the name of the file that will execute the program resides
6-
# INPUT_FILE - BASE_DUR plus the name of the file that will be used as input for the program
7-
8-
cd "${BASE_DIR}"
9-
10-
for classfile in *.class; do
11-
classname=${classfile%.*}
12-
13-
if javap -public ${classname} | fgrep -q "public static void main("; then
14-
if [ -n "${INPUT_FILE}" ]; then
15-
java ${classname} "$@" < "${INPUT_FILE}"
16-
else
17-
java ${classname} "$@"
18-
fi
19-
fi
20-
done
1+
#!/bin/bash
2+
3+
# BASE_DIR - base directory for the untrusty scripts
4+
# SRC_FILE - BASE_DUR plus the name of the text file where the source code resides
5+
# BIN_FILE - BASE_DUR plus the name of the file that will execute the program resides
6+
# INPUT_FILE - BASE_DUR plus the name of the file that will be used as input for the program
7+
8+
cd "${BASE_DIR}"
9+
10+
for classfile in *.class; do
11+
classname=${classfile%.*}
12+
13+
if javap -public ${classname} | fgrep -q "public static void main("; then
14+
if [ -n "${INPUT_FILE}" ]; then
15+
java ${classname} "$@" < "${INPUT_FILE}"
16+
else
17+
java ${classname} "$@"
18+
fi
19+
fi
20+
done

0 commit comments

Comments
 (0)