Signed-off-by: Ethan Sommer
---
scripts/libmakepkg/util/parseopts.sh.in | 110 +++-
test/scripts/parseopts_test.sh | 12 ++-
2 files changed, 77 insertions(+), 45 deletions(-)
diff --git a/scripts/libmakepkg/util/parseopts.sh.in
b/scripts/libmakepkg/util
Adds a "?" suffix that can be used to indicate that an option's argument is
optional.
This allows options to have a default behaviour when the user doesn't
specify one, e.g.: --color=[when] being able to behave like --color=auto
when only --color is passed
Signed-
o split
the option and its optarg easily
Signed-off-by: Ethan Sommer
---
scripts/libmakepkg/util/parseopts.sh.in | 116 +++-
test/scripts/parseopts_test.sh | 12 ++-
2 files changed, 83 insertions(+), 45 deletions(-)
diff --git a/scripts/libmakepkg/util/parseopts
Previously parseopts checked if there was an argument by checking
that the string was non-empty, resulting in empty arguments being
incorrectly considered non-existent. This change makes parseopts check
if arguments exist at all, rather than checking that they are non-empty
Signed-off-by: Ethan
> When parsing options, is there any case where an empty argument is
> functionally different from a missing one?
>
> I.e. what is the justification for considering empty arguments?
makepkg --config='' --clean
==> ERROR: --clean not found.
Aborting...
I think that this isn't correct and makes
> Again... devils advocate. You give an example of '--colour=auto' being
> equivalent to '--color'. Why would the default when the options is not
> specified not be default in the codebase?
Fair enough, another example could be if you wanted to allow specifying
a custom log file for whatever rea
o split
the option and its optarg easily
Signed-off-by: Ethan Sommer
---
scripts/libmakepkg/util/parseopts.sh.in | 116 +++-
test/scripts/parseopts_test.sh | 12 ++-
2 files changed, 83 insertions(+), 45 deletions(-)
diff --git a/scripts/libmakepkg/util/parseopts
Previously parseopts checked if there was an argument by checking
that the string was non-empty, resulting in empty arguments being
incorrectly considered non-existent. This change makes parseopts check
if arguments exist at all, rather than checking that they are non-empty
Signed-off-by: Ethan
Read PKGBUILD into an array and replace the pkgver and pkgrel with
bash parameter substitution, then use shell redirection to write to to
the file. Because shell redirection follows symlinks, this accomplishes
the same thing as the previous default of using the GNU-specific
--follow-symlinks sed fl
sed flag.
Removes SEDPATH and SEDINPLACEFLAGS from the build systems as they are
not used elsewhere.
Signed-off-by: Ethan Sommer
---
build-aux/edit-script.sh.in | 2 --
configure.ac| 11 ---
meson.build | 11 ---
meson_options.txt | 3
Redirect file to stdin so wc -c doesn't print a file name that needs to
be stripped.
Signed-off-by: Ethan Sommer
---
scripts/repo-add.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index caf1232d..7b2a9edb 1
Signed-off-by: Ethan Sommer
---
scripts/libmakepkg/tidy/strip.sh.in | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/scripts/libmakepkg/tidy/strip.sh.in
b/scripts/libmakepkg/tidy/strip.sh.in
index 1bd810f0..301d1989 100644
--- a/scripts/libmakepkg
able to extract
the file and is the one to use
Signed-off-by: Ethan Sommer
---
scripts/libmakepkg/source/file.sh.in | 39
1 file changed, 11 insertions(+), 28 deletions(-)
diff --git a/scripts/libmakepkg/source/file.sh.in
b/scripts/libmakepkg/source/file.sh.in
Signed-off-by: Ethan Sommer
---
build-aux/edit-script.sh.in | 1 -
configure.ac| 12
meson.build | 9 -
scripts/makepkg.sh.in | 4 +---
4 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/build-aux/edit-script.sh.in b/build
> > --- a/scripts/libmakepkg/tidy/strip.sh.in
> > +++ b/scripts/libmakepkg/tidy/strip.sh.in
> > @@ -111,22 +111,20 @@ tidy_strip() {
> >
> > local binary strip_flags
> > find . -type f -perm -u+w -print0 2>/dev/null | while IFS=
> > read -rd '' binary ; do
> > -
15 matches
Mail list logo