New process using mount point

This commit is contained in:
thomas 2022-02-20 15:02:18 +01:00
parent 637a60c3bf
commit 5d14cf2985
18 changed files with 217 additions and 244 deletions

View file

@ -1,8 +1,10 @@
#!/bin/bash
STEP="envinit prebuild build makedeb"
envinit() {
apt install -y ca-certificates git libolm3 libolm-dev build-essential wget
wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
}
prebuild(){
@ -15,19 +17,16 @@ prebuild(){
build() {
cd /tmp/whatsapp/
git checkout $1
PATH=$PATH:/usr/local/go/bin ./build.sh
}
makedeb(){
PATH_BUILD=$1
PATH_DEB=$2
GIT_VERSION=$3
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/dist/rootfs
cp ${PATH_BUILD}/tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp
cp ${PATH_BUILD}/tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
cp /tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp
cp /tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/
}
echo $1
FUNC=$1
shift
${FUNC} $*