Refactor bash scripting for init.yaml #246

Closed
opened 2021-11-16 16:48:06 +00:00 by nwmcsween · 7 comments
nwmcsween commented 2021-11-16 16:48:06 +00:00 (Migrated from gitea.com)

Non standard sh isn't really needed from what I can see in init.yaml

Non standard sh isn't really needed from what I can see in init.yaml
justusbunsi commented 2021-11-16 17:02:27 +00:00 (Migrated from gitea.com)

Could you explain a bit more detailed what you mean?

Could you explain a bit more detailed what you mean?
nwmcsween commented 2021-11-16 17:18:26 +00:00 (Migrated from gitea.com)

The scripts in https://gitea.com/gitea/helm-chart/src/branch/master/templates/gitea/init.yaml don't require any bashisms and could be refactored to standard sh #!/bin/sh

The scripts in https://gitea.com/gitea/helm-chart/src/branch/master/templates/gitea/init.yaml don't require any bashisms and could be refactored to standard sh `#!/bin/sh`
justusbunsi commented 2021-11-16 17:22:15 +00:00 (Migrated from gitea.com)

I get what you mean. If you like, you can create a PR to change this. Any contribution is welcome.

I get what you mean. If you like, you can create a PR to change this. Any contribution is welcome.
pat-s commented 2022-03-05 16:14:49 +00:00 (Migrated from gitea.com)

I wonder though if this change will make it harder to contribute in the future.
Most people possibly write in bash and not in sh and if there's a strong limitation to use sh only, people might eventually refrain from contributing?

I wonder though if this change will make it harder to contribute in the future. Most people possibly write in `bash` and not in `sh` and if there's a strong limitation to use `sh` only, people might eventually refrain from contributing?
nwmcsween commented 2022-03-18 19:42:06 +00:00 (Migrated from gitea.com)

I wonder though if this change will make it harder to contribute in the future.
Most people possibly write in bash and not in sh and if there's a strong limitation to use sh only, people might eventually refrain from contributing?

I don't see why? Bash isn't ubiquitous, take for example using any Alpine Linux images. There is no real limitation of Bash vs POSIX shell besides Bash making some things easier. Also the pervalnce of using #!/bin/bash needs to stop as a lot of the time it's just cargo culted.

> I wonder though if this change will make it harder to contribute in the future. > Most people possibly write in `bash` and not in `sh` and if there's a strong limitation to use `sh` only, people might eventually refrain from contributing? I don't see why? Bash isn't ubiquitous, take for example using any Alpine Linux images. There is no real limitation of Bash vs POSIX shell besides Bash making some things easier. Also the pervalnce of using `#!/bin/bash` needs to stop as a lot of the time it's just cargo culted.
justusbunsi commented 2022-03-20 10:16:17 +00:00 (Migrated from gitea.com)
Please see my comment on PR 273. (https://gitea.com/gitea/helm-chart/pulls/273#issuecomment-694188)
justusbunsi commented 2023-09-05 19:33:58 +00:00 (Migrated from gitea.com)

Closing for now. Feel free to reopen.

Closing for now. Feel free to reopen.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#246
No description provided.