New method

This commit is contained in:
thomas 2022-08-17 20:35:16 +02:00
parent 590209a9ba
commit 8da4693b9f
28 changed files with 111 additions and 330 deletions

View file

@ -1,9 +1,6 @@
#!/bin/bash
VERSION=3.3.1
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=grocy
DEPOT=https://github.com/grocy/grocy.git
GIT_VERSION=v$VERSION
@ -11,27 +8,11 @@ DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=sid
IMAGE_SIZE=4
STEP="envinit prebuild build makedeb"
STEP="base_package_upgrade envinit get_git_source build makedeb"
envinit() {
apt-get update
if [ $(dpkg -l | grep -e 'ii php-simplexml ' | wc -l) -eq 1 ];
then
apt-get dist-upgrade -y
else
apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg unzip
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y yarn
fi
}
prebuild(){
[ -e /tmp/git ] && rm -fr /tmp/git
[ -e /tmp/${APP} ] || mkdir /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
cp -r /tmp/git/. /tmp/${APP}
configure_depot_yarn
apt-get install -y --no-install-recommends composer php-simplexml php-gd unzip yarn
}
build() {