21 lines
525 B
Bash
Executable File
21 lines
525 B
Bash
Executable File
#!/bin/bash
|
|
|
|
STEP="envinit makedeb"
|
|
|
|
envinit() {
|
|
apt-get install -y wget ca-certificates fakeroot dpkg
|
|
}
|
|
|
|
|
|
makedeb(){
|
|
GIT_VERSION=$1
|
|
DEB_VERSION=$2
|
|
PATH_DEB=/tmp/dist/rootfs
|
|
|
|
wget https://github.com/laurent22/joplin/releases/download/v${GIT_VERSION}/Joplin-${GIT_VERSION}.AppImage -qO ${PATH_DEB}/usr/share/joplin/Joplin.AppImage
|
|
chmod +x ${PATH_DEB}/usr/share/joplin/Joplin.AppImage
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/
|
|
}
|
|
|