20 lines
536 B
Bash
Executable file
20 lines
536 B
Bash
Executable file
#!/bin/bash
|
|
|
|
STEP="envinit makedeb"
|
|
|
|
envinit() {
|
|
apt-get install -y --no-install-recommends wget ca-certificates fakeroot dpkg
|
|
}
|
|
|
|
|
|
makedeb(){
|
|
GIT_VERSION=$1
|
|
DEB_VERSION=$2
|
|
PATH_DEB=/tmp/src/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/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|
|
|