Refactor bash scripting for init.yaml #246

Closed
opened 2021-11-16 16:48:06 +00:00 by nwmcsween · 7 comments

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
Member

Could you explain a bit more detailed what you mean?

Could you explain a bit more detailed what you mean?
Author

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`
Member

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.
justusbunsi added the
kind
refactor
label 2021-11-16 17:23:16 +00:00
Member

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?
Author

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.
Member

Please see my comment on PR 273. (#273 (comment))

Please see my comment on PR 273. (https://gitea.com/gitea/helm-chart/pulls/273#issuecomment-694188)
Member

Closing for now. Feel free to reopen.

Closing for now. Feel free to reopen.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

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