-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplacement.sh
50 lines (42 loc) · 914 Bytes
/
placement.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
49
50
mkdir rust_artifacts
cd rust_artifacts
artifacts=$(pwd)
cd ..
mkdir builds
cd builds
builds=$(pwd)
cd ..
cd base-ai
base=$(pwd)
#echo $base
projects=($(ls))
for ai in "${projects[@]}"; do
cd $ai
current_ai=$ai
project_files=($(ls))
echo $project_files
for file in "${project_files[@]}"; do
#echo "${file}"
if [[ "${file}" == "Cargo.toml" ]]; then
export CARGO_TARGET_DIR=$artifacts
cargo build --release
cd $artifacts
cd release
cp -r "${ai}" $builds
echo "rust"
#cp -r "$file_to_copy" $base
elif [[ "${file}" == *.py ]]; then
cp -r "${file}" $builds
echo "python"
elif [[ "${file}" == *.cpp ]]; then
g++ -o ${file} ${file}.cpp
cp -r "${file}" $builds
echo "Cplusplus"
fi
done
cd $base
done
rm -rf rust_artifacts # only works with sudo
cd ..
cd game-hoster
cargo run fin