-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathTeamCurieCSV.sh
39 lines (36 loc) · 1.03 KB
/
TeamCurieCSV.sh
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
#!/bin/bash
REPO=https://github.com/peter9949/Team-Curie.git
OUTPUT_FILE=Team-Curie.csv
git clone $REPO
cd ./Team-Curie
for file in $(ls);
do
if [[ $file == *.py ]];
then
python3 $file >> $OUTPUT_FILE
elif [[ $file == *.js ]];
then
node $file >> $OUTPUT_FILE
elif [[ $file == *.cpp ]];
then
g++ $file
./a.out >> $OUTPUT_FILE
rm ./a.out
elif [[ $file == *.pl ]];
then
perl $file >> $OUTPUT_FILE
elif [[ $file == *.c ]];
then
gcc $file
./a.out >> $OUTPUT_FILE
rm ./a.out
elif [[ $file == *.java ]];
then
javac $file
name=`echo $file | cut -d\. -f1`
java $name >> $OUTPUT_FILE
elif [[ $file == *.R ]];
then
Rscript $file >> $OUTPUT_FILE
fi
done