| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #!/bin/bash
- # Run this from your project root (where visual-renamer binary is)
- VERSION="1.0.0"
- ARCH="amd64"
- DEB_NAME="visual-renamer_${VERSION}_${ARCH}"
- echo "Building structure for ${DEB_NAME}..."
- mkdir -p ${DEB_NAME}/usr/bin
- mkdir -p ${DEB_NAME}/usr/share/applications
- mkdir -p ${DEB_NAME}/usr/share/icons/hicolor/512x512/apps
- mkdir -p ${DEB_NAME}/DEBIAN
- echo "Copying binary and stripping that bloated shit..."
- cp visual-renamer ${DEB_NAME}/usr/bin/
- strip ${DEB_NAME}/usr/bin/visual-renamer
- chmod 755 ${DEB_NAME}/usr/bin/visual-renamer
- echo "Copying icon..."
- cp icon.png ${DEB_NAME}/usr/share/icons/hicolor/512x512/apps/visual-renamer.png
- chmod 644 ${DEB_NAME}/usr/share/icons/hicolor/512x512/apps/visual-renamer.png
- echo "Writing .desktop file with the correct wmclass..."
- cat <<EOF > ${DEB_NAME}/usr/share/applications/visual-renamer.desktop
- [Desktop Entry]
- Version=1.0
- Name=Visual Renamer
- Comment=Simple Image Renamer
- Exec=/usr/bin/visual-renamer
- Icon=visual-renamer
- Terminal=false
- Type=Application
- Categories=Graphics;Utility;
- StartupWMClass=simpleimagerenamer
- EOF
- chmod 644 ${DEB_NAME}/usr/share/applications/visual-renamer.desktop
- echo "Writing DEBIAN/control..."
- cat <<EOF > ${DEB_NAME}/DEBIAN/control
- Package: visual-renamer
- Version: ${VERSION}
- Section: graphics
- Priority: optional
- Architecture: ${ARCH}
- Depends: libgtkmm-3.0-1v5
- Maintainer: Nikki <nicole@builder>
- Description: Simple Image Renamer
- GUI for renaming images with drag and drop sorting.
- EOF
- echo "Building the fucking .deb..."
- dpkg-deb --build ${DEB_NAME}
- echo "Cleaning up..."
- rm -rf ${DEB_NAME}
- echo "Done. You now have ${DEB_NAME}.deb"
|