= compilescript

*compilescript* allows you to execute files from compiled languages like scripts.
By default it uses `g++`.

It compiles the source file, stores the binary in
`${XDG_CACHE_HOME}/compilescript/` and executes it. If the binary in cache is
newer than the source file, the compilation is skipped.

== Usage

Have a look at the https://schlomp.space/tastytea/compilescript/src/branch/master/compilescript.1.adoc[manpage].

== Install

=== Gentoo

Gentoo ebuilds are available via my
https://schlomp.space/tastytea/overlay[repository].

=== From source

==== Dependencies

* C++ compiler (tested: https://gcc.gnu.org/[gcc] 5/6/8/9,
  https://llvm.org/[clang] 3/6)
* https://cmake.org/[cmake] (at least 3.2)
* http://repo.or.cz/w/libxdg-basedir.git[libxdg-basedir] (tested: 1.2)
* https://github.com/hyperrealm/libconfig[libconfig++] (tested: 1.5)
* Optional:
** Manpage: http://asciidoc.org/[asciidoc] (tested: 8.6)

==== Get sourcecode

Download the current
https://schlomp.space/tastytea/compilescript/releases[release] and copy
https://schlomp.space/tastytea/xdgcfg[xdgcfg] into `xdgcfg/`,

.or clone with git:
[source,sh]
----
git clone https://schlomp.space/tastytea/compilescript.git
cd compilescript
git submodule init
git submodule update
----

==== Compile

[source,sh]
----
mkdir build
cd build
cmake ..
make
make install
----

.cmake options:
* `-DCMAKE_BUILD_TYPE=Debug` for a debug build
* `-DWITH_MAN=NO` to not compile the manpage

== Contributing

Contributions are always welcome. You can submit them as pull requests or via
email to `tastytea`@`tastytea.de`.

== License & Copyright

----
Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>.
License GPLv3: GNU GPL version 3 <https://www.gnu.org/licenses/gpl-3.0.html>.
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
----
