first and last commit
This commit is contained in:
commit
c9e78fd810
381 changed files with 37141 additions and 0 deletions
24
compile.sh
Executable file
24
compile.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
BUILD_ID=1
|
||||
if [ -e build.txt ]; then
|
||||
BUILD_ID=$(cat build.txt)
|
||||
let BUILD_ID=BUILD_ID+1
|
||||
fi
|
||||
MODIFIED=0
|
||||
if [ -e skcblitz ]; then
|
||||
MODIFIED=$(date -r skcblitz +%s)
|
||||
fi
|
||||
for header in *.h *.c; do
|
||||
if [ $(date -r "$header" +%s) -gt $MODIFIED ]; then
|
||||
if gcc -rdynamic -g -DBUILD_DATE="\"$(date)\"" -DBUILD_SYS="\"$(uname -snrm)\"" -DBUILD_ID=$BUILD_ID -DBUILD_COMP="\"$(gcc --version | head -n 1)\"" -o skcblitz program.c -lm -lX11 -ldl -lasound -pthread; then
|
||||
echo -n $BUILD_ID > build.txt
|
||||
echo "Build $BUILD_ID"
|
||||
break;
|
||||
else
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
set -x
|
||||
$@
|
Reference in a new issue