-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcsv-populator.sh
48 lines (46 loc) · 1.46 KB
/
csv-populator.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
39
40
41
42
43
44
45
46
47
48
REPO=https://github.com/ssiddhantsharma/team-greider.git
OUTPUT_FILE=team-greider.csv
git clone $REPO
cd ./team-greider
for file in $(ls);
do
if [[ $file == *.py ]];
then
python3 $file >> $OUTPUT_FILE
elif [[ $file == *.js ]];
then
node $file >> $OUTPUT_FILE
elif [[ $file == *.jl ]];
then
julia $file >> $OUTPUT_FILE
elif [[ $file == *.cpp ]];
then
g++ $file
./a.out >> $OUTPUT_FILE
rm ./a.out
elif [[ $file == *.cs ]];
then
g++ $file
./a.out >> $OUTPUT_FILE
rm ./a.out
elif [[ $file == *.sh ]];
then
bash $file >> $OUTPUT_FILE
elif [[ $file == *.rb ]];
then
ruby $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