1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
set -eu camellia_path_check VERSION=lua-5.4.4 fetch() { wget http://www.lua.org/ftp/${VERSION}.tar.gz tar xf ${VERSION}.tar.gz } prep() { [ -d ${VERSION} ] || (fetch) cd ${VERSION} } case $1 in install) (prep; make generic "CC=cc" "MYCFLAGS=-Werror") ;; clean) (prep; make clean) ;; *) echo "usage: $0 install|clean"; false ;; esac