diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-25 01:48:20 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-25 01:48:20 -0400 |
commit | 97ebb43d26d3e452f6ac8995f212ba971aefc231 (patch) | |
tree | bbb7554dd0534b02c21944cba3281737f9faf1c2 | |
parent | 2ac8f0c609bf52dce1ea2ec6d42182ac9ce982fb (diff) | |
download | dm-97ebb43d26d3e452f6ac8995f212ba971aefc231.tar.gz |
uglify build script
-rwxr-xr-x | build.sh | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -6,8 +6,13 @@ DFLAGS="-w -g -O" build_tinyendian() { pushd ${extern} - git clone --recursive https://github.com/dlang-community/tinyendian + [ ! -d "tinyendian" ] && git clone --recursive https://github.com/dlang-community/tinyendian pushd tinyendian + if [[ $(find . -name '*.a') ]]; then + popd + popd + return + fi git checkout v0.2.0 dmd ${DFLAGS} -lib -oflibtinyendian.a \ $(find source -type f -name '*.d') @@ -17,8 +22,13 @@ build_tinyendian() { build_dyaml() { pushd ${extern} - git clone --recursive https://github.com/dlang-community/D-YAML + [ ! -d "D-YAML" ] && git clone --recursive https://github.com/dlang-community/D-YAML pushd D-YAML + if [[ $(find . -name '*.a') ]]; then + popd + popd + return + fi git checkout v0.7.1 dmd ${DFLAGS} -lib -oflibdyaml.a \ -I../tinyendian/source \ @@ -28,6 +38,15 @@ build_dyaml() { popd } +clean() { + rm -rf ${extern} + rm -rf *.o +} + +if [ "$1" == "clean" ]; then + clean + exit 0 +fi mkdir -p ${extern} build_tinyendian |