diff options
Diffstat (limited to 'snap/pre/pack_installers')
-rwxr-xr-x | snap/pre/pack_installers | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/snap/pre/pack_installers b/snap/pre/pack_installers index c11bca8..a893574 100755 --- a/snap/pre/pack_installers +++ b/snap/pre/pack_installers @@ -27,7 +27,7 @@ with open(os.path.join(HELPDIR, POLKIT_FILE)) as polkit: b64_polkit = encode(polkit.read().encode()) with open(INSTALL, 'w') as install: - install.write('#!/usr/bin/env python3\n') + install.write('#!/usr/bin/env python\n') install.write('# DO NOT MODIFY MANUALLY\n') install.write('# This helper installs the polkit policy file\n') install.write('# for the RiseupVPN snap.\n') @@ -43,9 +43,10 @@ with open('/usr/share/polkit-1/actions/{polkit_file}', 'w') as polkit: for line in lines: polkit.write(line.decode() + "\\n") -release = subprocess.run(['cat', '/etc/os-release'], stdout=subprocess.PIPE).stdout +with open('/etc/os-release') as f: + release = f.read() # this is a workaround for the fact that debian does not place snap desktop entries in a system+wide path. -if b'ID=debian' in release: +if 'ID=debian' in release: cmd = 'ln -s /snap/{app_name}/current/snap/gui/{app_name}.desktop /usr/share/applications/' subprocess.run(cmd.split(' ')) subprocess.run(['update-desktop-database']) |