Permalink
Please sign in to comment.
Browse files
Update facil.io version + add common setup script (#3364)
* Update facil.io version + add common setup script
The main relevant difference in the updated facil.io version is the
memory allocator (I wrote a custom memory allocator that should
minimize lock contention).
It's possible to test the new version without the multi-threaded memory
allocator by using:
```sh
export CFLAGS="${CFLAGS} -DFIO_FORCE_MALLOC"
```
I tried testing the dockerfile locally, but couldn’t make it work.
For some reason the vagrant machine refuses to find the tfb command
(`vagrant up` complains with a number of errors as well, this being one
of them).
I might open a separate issue for that, but I’m not sure if it isn’t
something I’m doing wrong.
* Copy app only once- Loading branch information...
Showing
with
49 additions
and 10 deletions.
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
| # Don't redownload facil.io unless using the FIO_EDGE flag. | ||
| if [[ (! -d facil_app) || (-n "${FIO_EDGE}") ]] ; then | ||
| # remove existing installation, if any | ||
| if [ -e facil_app ] ; then | ||
| rm -R facil_app | ||
| fi | ||
| # create new installation folder | ||
| mkdir facil_app | ||
| cd facil_app | ||
| #### Download and unpack | ||
| # Download source selection | ||
| # Setting FIO_EDGE will test against the master branch on the development machine. i.e.: | ||
| # $ FIO_EDGE=1 tfb --mode verify --test facil.io | ||
| if [[ -z "${FIO_EDGE}" ]]; then | ||
| FIO_URL="https://api.github.com/repos/boazsegev/facil.io/tarball/0.6.0.beta.8" | ||
| else | ||
| echo "INFO: development mode detected, loading facil.io from master." | ||
| FIO_URL="https://github.com/boazsegev/facil.io/archive/master.tar.gz" | ||
| fi | ||
| # Download | ||
| curl -s -o facil.io.tar.gz -LJO $FIO_URL | ||
| # Unpack | ||
| tar --strip-components=1 -xzf facil.io.tar.gz | ||
| if [ $? -ne 0 ]; then echo "Couldn't extract tar."; exit 1; fi | ||
| # Cleanup | ||
| rm facil.io.tar.gz | ||
| ./scripts/new/cleanup | ||
| cd .. | ||
| fi | ||
| # remove any existing source files, such as boiler plate | ||
| rm -R facil_app/src | ||
| mkdir facil_app/src |
0 comments on commit
215a105