-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, Mar 21, 2020 at 07:11:12PM -0500, Jason Phan wrote:
> Hello!

Hello!

> I've recently taken an interest in Qubes and wanted to contribute. I figured 
> a 
> good starting point would be the shell scripts peppered throughout the 
> project 
> (e.g., qubes-app-linux-pdf-converter, qubes-app-linux-split-gpg).
>
> Currently, a majority of them lack any real structure or organization. Also, 
> I 
> believe some improvements can be made in the best practices department as 
> well.  
> In any case, if there are no objections, I'd like to try to improve these as 
> my 
> first contribution to Qubes (starting with the PDF converter).

Yes, PDF converter seems like a good starting point.

As for the qubes-app-linux-split-gpg, don't bother, it's going to be
replaced by a rewritten version soon-ish:
https://github.com/QubesOS/qubes-issues/issues/474
https://github.com/HW42/qubes-app-linux-split-gpg2/pull/6

> Now, I did have some questions regarding the scripts:
> 
>  1. Should I assume the scripts are POSIX shell scripts or Bash scripts? Some
>     have the /bin/sh shebang while others have /bin/bash.

First of all, see https://www.qubes-os.org/doc/coding-style/, which
discourage shell scripts at all, in preference of Python. This isn't
always practical in case of very short scripts (where boilerplate
required in python would be longer than the script itself), but I think
PDF converter left that category long time ago already.
But if you're not into converting shell->python, the current scripts
improvements would be very much appreciated too!

As for the shell scripts, prefer POSIX shell and /bin/sh shebang. In
some cases, where shell is still acceptable, but bash features (like
arrays, or extended string compare) would greatly simplify the script,
it is allowed to use bash, and then obviously set /bin/bash shebang.
The reason for that is bash is quite powerful, but also not very fast
and some distributions (like Debian) use faster alternative for /bin/sh.

>  2. Is there a minimum required shell version?

Basically whatever is present in (oldest) supported distribution:
https://www.qubes-os.org/doc/supported-versions/

This means bash 4.3 (Debian jessie).

- -- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAl52vvoACgkQ24/THMrX
1yzicggAmXw7dBM2NzNpr2uv6AQh58eSVxboPaQIrApfWY2J4lC2+slv6wvVoi7i
EpdbeXycZH5Re00v9CzKaLhJoAvY427hPebVWoqC0u+/W4RD54gtUjB34SEJ6d1g
2hiirNkSniTZgc0PvpQUYwDSt0pnYnbj1tDyPZNwLvJa3Vd4T6b2LG/d5GZxYT80
9YVDaPQRC3+1IJywwy6UBzAAx2qO30AdmJ/4YzsiRvF/LKobFAsdqFCCLO9Nj1op
WdL9u6A8cy0i8WtbdpuGJ0XVopJpT+bhMjO517XWZj07d21AfMFQObmzzYtALOTN
U3xAiAg2il432aeRIPnUZAZZA24j7g==
=lyJF
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/20200322012721.GE18599%40mail-itl.

Reply via email to