Compare commits
2 Commits
b51afc628f
...
f89b46a60d
Author | SHA1 | Date |
---|---|---|
Nakidai | f89b46a60d | |
Nakidai | 42bddb2ee4 |
|
@ -1,5 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [[ "$*" == *"--help"* ]] || [[ "$*" == *"-h"* ]]
|
||||||
|
then
|
||||||
|
echo "Use environment variables to pass values:
|
||||||
|
CC - compiler (default: cc)
|
||||||
|
CFLAGS - flags for compiler
|
||||||
|
LDFLAGS - flags for linker
|
||||||
|
OUT - out file (default: game
|
||||||
|
SIZE - size of game field
|
||||||
|
DEFX - start x
|
||||||
|
DEFY - start y"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
CC=${CC:-cc}
|
CC=${CC:-cc}
|
||||||
RM=${RM:-rm -f}
|
RM=${RM:-rm -f}
|
||||||
CFLAGS=${CFLAGS:-}
|
CFLAGS=${CFLAGS:-}
|
||||||
|
@ -21,8 +34,8 @@ echo "Size: $SIZE"
|
||||||
echo "Start x: $DEFX"
|
echo "Start x: $DEFX"
|
||||||
echo "Start y: $DEFY"
|
echo "Start y: $DEFY"
|
||||||
|
|
||||||
if [ ! test -d config ]; then
|
if ! test -d config; then
|
||||||
if [ test-f config ]; then
|
if test -f config; then
|
||||||
rm config
|
rm config
|
||||||
fi
|
fi
|
||||||
mkdir config
|
mkdir config
|
||||||
|
|
Loading…
Reference in New Issue