Source

javascript-for-python-programmers / core-javascript / make-release.sh

Full commit
#!/bin/sh

# Make release of exercises in local/javascript-exercises.  Run from
# the core-javascript folder (for now).

set -u

LOCAL=../local

TMP=${LOCAL}/javascript-exercises-tmp

SRC=${TMP}/core-javascript/javascript-exercises
TGT=${LOCAL}/javascript-exercises

JSDB=javascript-exercises/jsdb.exe

rm -rf ${TMP}
hg archive -I javascript-exercises ${TMP}

find ${SRC}

rm -rf ${TGT}/*                  # But not hgignore etc

cp -rv ${SRC}/* ${TGT}/

(
    cd ${TGT} || (echo 'Error' && exit)

    hg addremove
    hg commit -m 'Dummy message'

    git add .
    git commit -a -m 'Dummy message'
)


cp ${JSDB} ${TGT}