-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·37 lines (31 loc) · 901 Bytes
/
build.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
#!/usr/bin/env bash
if pushd sqlite3 > /dev/null; then
./build.sh || exit 1 && \
popd > /dev/null
fi
config="debug"
platform="linux"
arch="x86_64"
sourceDir="src"
mainSource="$sourceDir/firemark/app.d"
outputDir="bin/$config-$platform-$arch"
outputFile="$outputDir/firemark"
outdated=false
if [[ -f $outputFile ]]; then
if [[ "${BASH_SOURCE[0]}" -nt "$outputFile" ]]; then
outdated=true
else
readarray -d '' files < <(find "$sourceDir" -print0)
for file in "${files[@]}"; do
if [[ -f "$file" && "$file" -nt "$outputFile" ]]; then
outdated=true
break
fi
done
fi
else
outdated=true
fi
if [[ "$outdated" == true ]]; then
dmd -i -g -debug -m64 -w -vcolumns -preview=dip1000 -preview=dip1008 -preview=fieldwise -preview=fixAliasThis -preview=rvaluerefparam -preview=inclusiveincontracts "sqlite3/sqlite3.o" -J"$sourceDir" -I"$sourceDir" "$mainSource" -of"$outputFile"
fi