#!/bin/bash VERSION=4.4 APP=moodle-block-cohortspecifichtml DEPOT=https://github.com/moodle-an-hochschulen/moodle-block_cohortspecifichtml.git GIT_VERSION=v$VERSION-r1 DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M) DEBIAN_VERSION_CODENAME=bookworm IMAGE_SIZE=1 PACKAGE_DEPENDENCY="" main(){ base_package_upgrade install_package_dependency default_prebuild build makedeb } build(){ cd /tmp/${APP} } makedeb(){ PATH_DEB=/tmp/src/rootfs mkdir -p ${PATH_DEB}/usr/share/moodle/blocks/ mv /tmp/${APP} ${PATH_DEB}/usr/share/moodle/blocks/cohortspecifichtml sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist }