Another refactor
This commit is contained in:
parent
9c0cb8c32f
commit
a767208c33
14 changed files with 116 additions and 149 deletions
|
@ -8,10 +8,12 @@ envinit() {
|
|||
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
|
||||
apt-get -y dist-upgrade
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
GIT_VERSION=$1
|
||||
[ -d /tmp/grocy/ ] && rm -fr /tmp/grocy/
|
||||
git clone --depth 1 -b ${GIT_VERSION} https://github.com/grocy/grocy.git /tmp/grocy/
|
||||
}
|
||||
|
||||
|
@ -25,15 +27,15 @@ build() {
|
|||
makedeb(){
|
||||
GIT_VERSION=$1
|
||||
DEB_VERSION=$2
|
||||
PATH_DEB=/tmp/dist/rootfs
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
find /tmp/grocy -name .gitignore -exec rm {} \;
|
||||
mv /tmp/grocy/data ${PATH_DEB}/var/lib/grocy/
|
||||
cp -fr /tmp/grocy/* ${PATH_DEB}/usr/share/grocy/
|
||||
cp ${PATH_DEB}/usr/share/grocy/config-dist.php ${PATH_DEB}/etc/grocy/config.php
|
||||
mv ${PATH_DEB}/usr/share/grocy/data ${PATH_DEB}/var/lib/grocy/
|
||||
ln -s /var/lib/grocy/data/ ${PATH_DEB}/usr/share/grocy/data
|
||||
ln -s /etc/grocy/config.php ${PATH_DEB}/usr/share/grocy/data/config.php
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/
|
||||
ln -s /etc/grocy/config.php ${PATH_DEB}/var/lib/grocy/data/config.php
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue