sweeCrypt-GTK/generate-flatpak.py

14 lines
547 B
Python
Raw Normal View History

2024-12-26 20:52:45 -08:00
#!/usr/bin/python3
import os
print("Creating Flatpak package...")
file = open("sweecrypt-gtk.py").read().split("\n")
file[3] = 'UI_FILE = "/app/opt/sweecrypt-gtk.ui"'
file.insert(0, "#!/usr/bin/env python3")
file = "\n".join(file)
open("sweecrypt-gtk-flatpak.py", "w").write(file)
2024-12-26 20:57:08 -08:00
os.system("chmod 1777 sweecrypt-gtk-flatpak.py")
2024-12-27 18:02:40 -08:00
file = open("sweecrypt-gtk.ui").read().split("\n")
file[19] = " <property name=\"icon-name\">codes.swee.SweeCryptGTK</property>"
2024-12-27 18:15:39 -08:00
file = "\n".join(file)
2024-12-27 18:02:40 -08:00
open("flatpak.ui", "w").write(file)
2024-12-26 21:06:21 -08:00
os.system("mkdir flatpak")