[pacman-dev] [PATCH v3 0/2] Move parseopts from library to makepkg

Alad Wenter alad at archlinux.info
Sat Oct 8 17:31:45 UTC 2016


v3: 
- account for tests (PM_LIBMAKEPKG_DIR)
- fix other scripts (apart from contrib)
- add commit messages
- generate util/*.sh with make

Note: parseopts uses $0 to get the script name inside the error message;
BASH_SOURCE would display the name of the libmakepkg script.

An other option is to set a fixed "argv0" variable in the various scripts, and
refer to that from parseopts.

Alad Wenter (2):
  makepkg: Move parseopts from library to libmakepkg
  libmakepkg: generate scripts in util

 Makefile.am                                        |   3 +-
 scripts/Makefile.am                                |  14 +-
 .../libmakepkg/util/{message.sh => message.sh.in}  |   0
 scripts/libmakepkg/util/option.sh                  | 142 ----------
 scripts/libmakepkg/util/option.sh.in               | 299 +++++++++++++++++++++
 scripts/libmakepkg/util/{util.sh => util.sh.in}    |   0
 scripts/library/README                             |  20 --
 scripts/library/parseopts.sh                       | 137 ----------
 scripts/makepkg.sh.in                              |   2 -
 scripts/pacman-db-upgrade.sh.in                    |   7 +-
 scripts/pacman-key.sh.in                           |   7 +-
 scripts/pkgdelta.sh.in                             |   9 +-
 scripts/po/POTFILES.in                             |   2 +-
 scripts/po/ar.po                                   |  10 +-
 scripts/po/ast.po                                  |  10 +-
 scripts/po/az_AZ.po                                |  10 +-
 scripts/po/bg.po                                   |  10 +-
 scripts/po/br.po                                   |  10 +-
 scripts/po/ca.po                                   |  10 +-
 scripts/po/cs.po                                   |  10 +-
 scripts/po/da.po                                   |  10 +-
 scripts/po/de.po                                   |  10 +-
 scripts/po/el.po                                   |  10 +-
 scripts/po/en_GB.po                                |  10 +-
 scripts/po/eo.po                                   |  10 +-
 scripts/po/es.po                                   |  10 +-
 scripts/po/es_419.po                               |  10 +-
 scripts/po/eu.po                                   |  10 +-
 scripts/po/fi.po                                   |  10 +-
 scripts/po/fr.po                                   |  10 +-
 scripts/po/gl.po                                   |  10 +-
 scripts/po/hr.po                                   |  10 +-
 scripts/po/hu.po                                   |  10 +-
 scripts/po/id.po                                   |  10 +-
 scripts/po/is.po                                   |  10 +-
 scripts/po/it.po                                   |  10 +-
 scripts/po/ja.po                                   |  10 +-
 scripts/po/ka.po                                   |  10 +-
 scripts/po/kk.po                                   |  10 +-
 scripts/po/ko.po                                   |  10 +-
 scripts/po/lt.po                                   |  10 +-
 scripts/po/nb.po                                   |  10 +-
 scripts/po/nl.po                                   |  10 +-
 scripts/po/pacman-scripts.pot                      |  10 +-
 scripts/po/pl.po                                   |  10 +-
 scripts/po/pt.po                                   |  10 +-
 scripts/po/pt_BR.po                                |  10 +-
 scripts/po/ro.po                                   |  10 +-
 scripts/po/ru.po                                   |  10 +-
 scripts/po/sk.po                                   |  10 +-
 scripts/po/sl.po                                   |  10 +-
 scripts/po/sr.po                                   |  10 +-
 scripts/po/sr at latin.po                             |  10 +-
 scripts/po/sv.po                                   |  10 +-
 scripts/po/tr.po                                   |  10 +-
 scripts/po/uk.po                                   |  10 +-
 scripts/po/uz.po                                   |  10 +-
 scripts/po/zh_CN.po                                |  10 +-
 scripts/po/zh_TW.po                                |  10 +-
 test/scripts/parseopts_test.sh                     |   2 +-
 60 files changed, 559 insertions(+), 545 deletions(-)
 rename scripts/libmakepkg/util/{message.sh => message.sh.in} (100%)
 delete mode 100644 scripts/libmakepkg/util/option.sh
 create mode 100644 scripts/libmakepkg/util/option.sh.in
 rename scripts/libmakepkg/util/{util.sh => util.sh.in} (100%)
 delete mode 100644 scripts/library/parseopts.sh

-- 
2.10.0


More information about the pacman-dev mailing list