2024-07-21 12:44:14 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-07-28 15:09:13 -07:00
|
|
|
arch=$(uname -m)
|
2024-07-21 12:44:14 -07:00
|
|
|
distDir=dist/navpoint-linux-$arch
|
|
|
|
|
|
|
|
rm -rf $distDir
|
|
|
|
mkdir $distDir
|
|
|
|
|
|
|
|
pyinstaller -w -F --hidden-import tornado.web main.py
|
|
|
|
|
|
|
|
mv dist/main $distDir/navpoint
|
|
|
|
cp icon.png $distDir/navpoint.png
|
|
|
|
|
|
|
|
cat > $distDir/navpoint.desktop << HERE
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Terminal=false
|
|
|
|
Name=Navpoint
|
|
|
|
Exec=/bin/sh -c "$HOME/.local/bin/navpoint"
|
|
|
|
Icon=navpoint
|
|
|
|
StartupWMClass=navpoint
|
|
|
|
HERE
|
|
|
|
|
|
|
|
cat > $distDir/install.sh << HERE
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
binary_target=~/.local/bin/
|
|
|
|
desktop_target=~/.local/share/applications/
|
|
|
|
icon_target=~/.local/share/icons/
|
|
|
|
|
|
|
|
cp navpoint \$binary_target/navpoint
|
|
|
|
chmod +x \$binary_target/navpoint
|
|
|
|
|
|
|
|
cp navpoint.desktop \$desktop_target/navpoint.desktop
|
|
|
|
|
|
|
|
cp navpoint.png \$icon_target/navpoint.png
|
|
|
|
HERE
|
|
|
|
chmod +x $distDir/install.sh
|
|
|
|
|
|
|
|
tar -czf $distDir.tar.gz $distDir
|