33 lines
788 B
Bash
Executable File
33 lines
788 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=2.4.0
|
|
APP=babybuddy
|
|
DEPOT=https://github.com/babybuddy/babybuddy.git
|
|
GIT_VERSION=v${VERSION}
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=6
|
|
PACKAGE_DEPENDENCY=""
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
install_package_dependency
|
|
get_git_source
|
|
makedeb
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
mkdir -p ${PATH_DEB}/etc/babybuddy/
|
|
mv /tmp/${APP}/babybuddy/settings/production.example.py ${PATH_DEB}/etc/babybuddy/production.py
|
|
|
|
mkdir -p ${PATH_DEB}/usr/share/
|
|
cp -fr /tmp/${APP}/ ${PATH_DEB}/usr/share/
|
|
|
|
ln -s /etc/babybuddy/production.py ${PATH_DEB}/usr/share/babybuddy/babybuddy/settings/production.py
|
|
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|