diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-24 15:52:23 -0500 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-24 15:52:23 -0500 |
commit | ced7ede3cd0853c9954bda518aaf546d3a0e5389 (patch) | |
tree | 6b491ba47d8c652896492ba0dc4104610ff3bc0a | |
parent | 9b826f343fc6569b6fd8eebb4eec1be89f6476f9 (diff) | |
download | html5ks-ced7ede3cd0853c9954bda518aaf546d3a0e5389.tar.xz html5ks-ced7ede3cd0853c9954bda518aaf546d3a0e5389.zip |
obsolete setup.sh
-rw-r--r-- | Makefile | 2 | ||||
m--------- | Modernizr | 0 | ||||
-rwxr-xr-x | setup.sh | 50 | ||||
-rw-r--r-- | unrpyc/Makefile | 6 | ||||
-rwxr-xr-x | unrpyc/find-gzip.sh | 5 |
5 files changed, 7 insertions, 56 deletions
@@ -23,6 +23,8 @@ endif DUMP ?= www/dump all: video audio images js +# fails miserably, fix pls +# cd unrpyc && $(MAKE) install # === VIDEO === diff --git a/Modernizr b/Modernizr -Subproject 96b3e677965b33e4af227d573da69775f2ad480 +Subproject 8a5b7a95bf03bef04f0917ce3fa36f633017863 diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 0a53722..0000000 --- a/setup.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -set -e -x - -cd $(dirname $0) - -check-reqs_no() { -} - -check-reqs_disk() { - local space - - space=$(df -P . 2>/dev/null | awk 'FNR == 2 {print $4}') - - if [[ $? == 0 && -n $space && $space -lt $1 ]] ; then - echo >&2 "Warning: There is NOT at least $1 KiB disk space available, build may fail." - fi -} - -check-reqs_memory() { - local actual_memory - - if [[ -r /proc/meminfo ]] ; then - actual_memory=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) - fi - if [[ -n $actual_memory && $actual_memory -lt $((1024 * $1)) ]] ; then - echo >&2 "Warning: There is NOT at least $1 KiB RAM available, build may fail." - echo >&2 "If it does, try setting MAKEOPTS lower or simply re-running this script." - fi -} - -if ! grep -q -- -j <<< "$MAKEOPTS"; then - NPROC="`nproc`" - MAKEOPTS="-j$NPROC $MAKEOPTS" - echo >&2 "No -j detected, setting $MAKEOPTS automatically." - check-reqs_memory $(( NPROC * 262144 )) # 256 MiB/job - if [[ $NOTEMP ]]; then - check-reqs_disk 500000 # 500 MiB - else - check-reqs_disk 13000000 - echo >&2 "If you have insufficient disk space (indicated if so above), consider setting NOTEMP=1 to disable generation of Y4M files." - fi -fi - -cd unrpyc -# silence build failure -make $MAKEOPTS install || true -cd .. - -make $MAKEOPTS diff --git a/unrpyc/Makefile b/unrpyc/Makefile index ea331ba..3259d12 100644 --- a/unrpyc/Makefile +++ b/unrpyc/Makefile @@ -1,8 +1,8 @@ GZIP := $(shell ./find-gzip.sh) -TARGETS := script.json script.json.gz imachine.json imachine.json.gz ui-strings.json ui-strings.json.gz ui-strings_FR.json ui-strings_FR.json.gz +JSON := script.json script.json.gz imachine.json imachine.json.gz ui-strings.json ui-strings.json.gz ui-strings_FR.json ui-strings_FR.json.gz -all: $(TARGETS) +all: $(JSON) %.json.gz: %.json $(GZIP) -c $< > $@ @@ -38,7 +38,7 @@ test: all install: all [ -d ../www/json ] || mkdir ../www/json - cp -f $(TARGETS) ../www/json + cp -f $(JSON) ../www/json uninstall: $(RM) ../www/json/* diff --git a/unrpyc/find-gzip.sh b/unrpyc/find-gzip.sh index de6d19e..2c2e51d 100755 --- a/unrpyc/find-gzip.sh +++ b/unrpyc/find-gzip.sh @@ -2,9 +2,8 @@ if command -v zopfli; then : elif command -v gzip; then - echo >&2 "Consider obtaining zopfli (https://code.google.com/p/zopfli/)" - echo >&2 "for higher compression ratios (about 5% decrease in size of" - echo >&2 "script.json.gz)." + echo >&2 "Consider obtaining zopfli (https://github.com/Hello71/zopfli) for higher" + echo >&2 "compression ratios (about 5% decrease in size of script.json.gz)." else echo >&2 "Could not find zopfli or gzip, aborting." exit 1 |