diff --git a/.gitignore b/.gitignore index 990936c..8a579ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ +build/ cmake-build-debug/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..57d1ec7 --- /dev/null +++ b/README.md @@ -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. diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 2817eab..f16d52e --- a/build.sh +++ b/build.sh @@ -1,3 +1,14 @@ #!/usr/bin/env zsh - gcc -std=c90 -o cordle src/*.c -Iinclude -lncurses \ No newline at end of file +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