diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 221abdc0..598698e3 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -47,6 +47,7 @@ INCLUDE_SIGS=0 # Import libmakepkg source "$LIBRARY"/util/compress.sh source "$LIBRARY"/util/message.sh +source "$LIBRARY"/util/parseopts.sh # ensure we have a sane umask set umask 0022 @@ -601,6 +602,16 @@ done trap 'trap_exit "$(gettext "Aborted by user! Exiting...")"' INT trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR + +OPT_SHORT="knpqRsv" +OPT_LONG=('include-sigs' 'key' 'new' 'nocolor' 'quiet' 'prevent-downgrade' 'remove' + 'sign' 'verify') +if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then + exit 1 # E_INVALID_OPTION +fi +set -- "${OPTRET[@]}" +unset OPT_SHORT OPT_LONG OPTRET + declare -a args # parse arguments while (( $# )); do