On 10/09/2016 03:04 AM, Eli Schwartz wrote:
On 10/08/2016 01:34 PM, Alad Wenter wrote:
parseopts is used in makepkg and other scripts such as pacman-key as a
getopt replacement.

Instead of including it in those scripts via a macro, move it to
libmakepkg/util/option.sh and have scripts source libmakepkg where
appropriate.
Is it necessary for all those scripts to source the entirety of
libmakepkg? In fact, many parts of libmakepkg source a specific file
that that libmakepkg component needs.
The idea was that sourcing all of libmakepkg may simplify later extension; though there's indeed a lot of stuff and for now we could only source the relevant file.

I also don't think it should go in util/option.sh which doesn't have
anything to do with getopt/parseopts/any sort of command-line opts at all.
The header states:

```
option.sh - functions to test if build/packaging options are enabled
```

Why not move it to util/parseopts.sh if it should be moved into libmakepkg?

I suppose that makes sense. util/util.sh ("General utility functions") may also be appropriate if we don't want to create a new file.

As a side note, if someone knows a way to automatically generate those code line numbers in the .po files (this seems possible according to the gettext manual), feel free to tell me. :D

Alad

Reply via email to