diff options
author | ubq323 <ubq323@ubq323.website> | 2022-11-17 01:30:10 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-11-17 01:30:10 +0000 |
commit | 7b531bd6a72eea1df6dfa7338ddf244bfdcfae6f (patch) | |
tree | 914d1024234edf0e00f59a29ecc28944719d46a7 | |
parent | 08c8ca943844a6575bed517f6cfd7bf7574a47db (diff) |
build.sh and things
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | build.sh | 31 |
2 files changed, 30 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..148363c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +out + @@ -1,5 +1,30 @@ #!/bin/sh -# this will become more advanced later -date -lua index2.lua >index2.html +usage() { + echo "$0: usage: $0 <destdir> [<srcdir>]" >&2 +} + +if [ $# -lt 1 ] || [ $# -gt 2 ]; then + usage + return 1 +fi + +dst=$1 +src=${2:-.} + +echo "building at $(date)" + +bp() { + echo "${src}/$1 ==> ${dst}/$2" + lua "${src}/$1" >"${dst}/$2" +} +bpn() { bp ${1}.lua ${1}.html; } +cf() { + echo "${src}/$1 -> ${dst}/$1" + cp -r "${src}/$1" "${dst}/$1" +} + +bpn index +#cf icons +cf bg.png +cf me.png |