pacman/scripts/libmakepkg
Ethan Sommer 7be7552329 libmakepkg: add optional argument support to parseopts
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

Options with optional arguments given on the command line will be returned
in the form "--opt=optarg" and "-o=optarg". Despite that not being the
syntax for passing an argument with a shortopt (trying to pass -o=foo
would make -o's argument "=foo"), this is done to allow the caller to split
the option and its optarg easily

Signed-off-by: Ethan Sommer <e5ten.arch@gmail.com>
Reviewed-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-11-04 10:55:23 +10:00
..
buildenv Update copyright years 2019-10-23 22:06:54 +10:00
executable Update copyright years 2019-10-23 22:06:54 +10:00
integrity Update copyright years 2019-10-23 22:06:54 +10:00
lint_config Update copyright years 2019-10-23 22:06:54 +10:00
lint_package Update copyright years 2019-10-23 22:06:54 +10:00
lint_pkgbuild Update copyright years 2019-10-23 22:06:54 +10:00
source Update copyright years 2019-10-23 22:06:54 +10:00
tidy makepkg: protect against unexpected whitespace in filenames 2019-10-30 09:47:28 +10:00
util libmakepkg: add optional argument support to parseopts 2019-11-04 10:55:23 +10:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
buildenv.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
executable.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
integrity.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
lint_config.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
lint_package.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
lint_pkgbuild.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
meson.build meson: remove useless mkdir -p 2018-12-12 10:12:41 +10:00
source.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
srcinfo.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
tidy.sh.in Update copyright years 2019-10-23 22:06:54 +10:00
util.sh.in Update copyright years 2019-10-23 22:06:54 +10:00