Compare commits

..

2 Commits

Author SHA1 Message Date
Nakidai f89b46a60d
Add help 2023-10-30 03:27:47 +03:00
Nakidai 42bddb2ee4
Fix configure 2023-10-30 03:17:54 +03:00
1 changed files with 15 additions and 2 deletions

17
configure vendored
View File

@ -1,5 +1,18 @@
#!/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}
RM=${RM:-rm -f}
CFLAGS=${CFLAGS:-}
@ -21,8 +34,8 @@ echo "Size: $SIZE"
echo "Start x: $DEFX"
echo "Start y: $DEFY"
if [ ! test -d config ]; then
if [ test-f config ]; then
if ! test -d config; then
if test -f config; then
rm config
fi
mkdir config