2.4.0: use TERMUX_PKG_CACHEDIR instead of TERMUX_SCRIPTDIR
generate-db.js: use TERMUX_PKG_CACHEDIR instead of TERMUX_SCRIPTDIR to customize repo.json
generate_db.js: Refactor the code
generate-db.js: use TERMUX_PKG_CACHEDIR instead of TERMUX_SCRIPTDIR to customize repo.json
generate_db.js: Refactor the code