add readme and build script
This commit is contained in:
parent
640bc3eb41
commit
f4c67ede2e
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.idea/
|
||||
build/
|
||||
cmake-build-debug/
|
||||
|
||||
27
README.md
Normal file
27
README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# CORDLE - The C90 Version of Wordle
|
||||
|
||||
## Requirements
|
||||
|
||||
- C90 compiler (tested with gcc -std=c90)
|
||||
- Standard C library
|
||||
- Ncurses
|
||||
|
||||
## Build
|
||||
|
||||
```
|
||||
$ ./build.sh
|
||||
Building application.
|
||||
Compile successful. Copying wordlists...
|
||||
Build completed.
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```
|
||||
$ cd build/cordle
|
||||
$ cordle
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
Just copy the `cordle` binary in the build directory to your `$PATH`. If you want to use the supplied wordlists, copy the `wordlists` directory to your binary directory as well. Or supply your own wordlist path using the command line options.
|
||||
13
build.sh
Normal file → Executable file
13
build.sh
Normal file → Executable file
@ -1,3 +1,14 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
gcc -std=c90 -o cordle src/*.c -Iinclude -lncurses
|
||||
mkdir -p build/cordle
|
||||
|
||||
echo "Building application."
|
||||
gcc -std=c90 -o build/cordle/cordle src/*.c -Iinclude -lncurses
|
||||
export RESULT=$?
|
||||
|
||||
# shellcheck disable=SC1073
|
||||
if (( RESULT == 0 )); then
|
||||
echo "Compile successful. Copying wordlists..."
|
||||
cp -R wordlists build/cordle
|
||||
echo "Build completed."
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user