From ced7ede3cd0853c9954bda518aaf546d3a0e5389 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 24 Feb 2014 15:52:23 -0500 Subject: obsolete setup.sh --- Makefile | 2 ++ Modernizr | 2 +- setup.sh | 50 -------------------------------------------------- unrpyc/Makefile | 6 +++--- unrpyc/find-gzip.sh | 5 ++--- 5 files changed, 8 insertions(+), 57 deletions(-) delete mode 100755 setup.sh diff --git a/Makefile b/Makefile index d8a2e39..1eefe38 100644 --- a/Makefile +++ b/Makefile @@ -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 index 96b3e67..8a5b7a9 160000 --- a/Modernizr +++ b/Modernizr @@ -1 +1 @@ -Subproject commit 96b3e677965b33e4af227d573da69775f2ad480b +Subproject commit 8a5b7a95bf03bef04f0917ce3fa36f633017863a 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 -- cgit v1.2.3-70-g09d2