working bash version #1

Closed
ben wants to merge 0 commits from bash-edition into master
Owner

i'm open to discussion on this but it's super simple to do in bash.

i wasn't keen to handle a bunch of subprocesses in python.

i'm open to discussion on this but it's super simple to do in bash. i wasn't keen to handle a bunch of subprocesses in python.
Owner

I have 2 main issues with this.

  1. I don't agree with GPL licensing, seeing as how any edits to this would be trivial. (change name, change what email is used for the sudoers, etc.)
  2. You spend about 87% of the script just making error handlers, taking care of input, etc.
    (I'm counting lines 92-107 as the ones that actually do what the script is intended for.) My Python script I'm writing, on the other hand, takes 6 lines (1 import, 1 init, 3 argument additions, and 1 parse call) for the error handling, allowing me to get to work much faster and leaving not a lot of clutter. That's why I wanted it in Python: Batteries included make it easier and more clear what's happening.

Also, we don't need to deal with a lot of subprocesses. Password generation can be done in-script, crypting the password can be done in-script. The only subprocesses are 1) add user, 2) add SSH key, and 3) send toot, all of which are trivial.

I have 2 main issues with this. 1. I don't agree with GPL licensing, seeing as how any edits to this would be trivial. (change name, change what email is used for the sudoers, etc.) 2. You spend about 87% of the script just making error handlers, taking care of input, etc. ([I'm counting lines 92-107 as the ones that actually do what the script is intended for.](https://tildegit.org/team/makeuser/src/commit/abaff4c37df37eab60a24b6db749630b80e05beb/makeuser#L83-L112)) My Python script I'm writing, on the other hand, takes 6 lines (1 import, 1 init, 3 argument additions, and 1 parse call) for the error handling, allowing me to get to work much faster and leaving not a lot of clutter. That's why I wanted it in Python: Batteries included make it easier and more clear what's happening. Also, we don't need to deal with a lot of subprocesses. Password generation can be done in-script, `crypt`ing the password can be done in-script. The only subprocesses are 1) add user, 2) add SSH key, and 3) send toot, all of which are trivial.
Author
Owner

what's wrong with a gpl license?

what's wrong with a gpl license?
Owner

why require people to share their changes if nobody's going to change it massively? it works already, someone might do rebranding I guess. there's no real need.

why require people to share their changes if nobody's going to change it massively? it works already, someone might do rebranding I guess. there's no real need.
Author
Owner

what license would you prefer?

I just used a script template (new_script iirc) and it handled all the boilerplate for me. it can definitely be tidied up.

python still seems like a lot of overhead to me.

what license would you prefer? I just used a script template (new_script iirc) and it handled all the boilerplate for me. it can definitely be tidied up. python still seems like a lot of overhead to me.
Owner

I prefer the MIT license, the one that I put on the repo when I made it.

I prefer the MIT license, the one that I put on the repo when I made it.
Author
Owner

fine with me

fine with me
Author
Owner

removed unnecessary boilerplate and in-line license

removed unnecessary boilerplate and in-line license
Author
Owner

tidied up bash version works. i've tested it in a vm.

tidied up bash version works. i've tested it in a vm.
ben closed this pull request 2019-02-15 18:48:32 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 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: team/makeuser#1
No description provided.