mirror of
https://ghproxy.net/https://github.com/bohdanbobrowski/blog2epub.git
synced 2026-07-27 13:07:20 +08:00
30 lines
No EOL
1,002 B
Bash
Executable file
30 lines
No EOL
1,002 B
Bash
Executable file
#!/bin/bash
|
|
# TODO: set version number as variable!
|
|
if [ -f "./dist/blog2epub" ]; then
|
|
mkdir -p ./dist/blog2epub_v1.5.0.AppDir/usr/bin/
|
|
cp ./dist/blog2epub ./dist/blog2epub_v1.5.0.AppDir/usr/bin/
|
|
cp ./assets/blog2epub.svg ./dist/blog2epub_v1.5.0.AppDir/
|
|
cp ./assets/blog2epub.png ./dist/blog2epub_v1.5.0.AppDir/
|
|
echo """#!/bin/bash
|
|
if [[ ! \"\${APPIMAGE}\" || ! \"\${APPDIR}\" ]]; then
|
|
export APPIMAGE=\"\$(readlink -f \"\${0}\")\"
|
|
export APPDIR=\"\$(dirname \"\${APPIMAGE}\")\"
|
|
fi
|
|
\$APPDIR/usr/bin/blog2epub
|
|
""" > ./dist/blog2epub_v1.5.0.AppDir/AppRun
|
|
chmod +x ./dist/blog2epub_v1.5.0.AppDir/AppRun
|
|
echo """[Desktop Entry]
|
|
Name=blog2epub
|
|
Exec=blog2epub
|
|
Icon=blog2epub
|
|
Type=Application
|
|
Categories=Utility
|
|
Keywords=ebook;epub;ereader;
|
|
Terminal=false
|
|
StartupNotify=true
|
|
NoDisplay=false
|
|
X-AppImage-Version=1.5.0
|
|
X-AppImage-Arch=x86_64
|
|
""" > ./dist/blog2epub_v1.5.0.AppDir/blog2epub.desktop
|
|
ARCH=x86_64 appimagetool ./dist/blog2epub_v1.5.0.AppDir ./dist/blog2epub_v1.5.0.AppImage $1
|
|
fi |