Signed-off-by: Cedric Staniewski <cedric@gmx.ca> --- scripts/repo-add.sh.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index eb8837c..2133fed 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -216,8 +216,8 @@ db_write_entry() md5sum="$(openssl dgst -md5 "$pkgfile" | awk '{print $NF}')" csize=$(@SIZECMD@ "$pkgfile") - # ensure $pkgname and $pkgver variables were found - if [ -z "$pkgname" -o -z "$pkgver" ]; then + # ensure $pkgname and $pkgver variables were found and pkgname does not start with a minus + if [ -z "$pkgname" -o "${pkgname:0:1}" == "-" -o -z "$pkgver" ]; then error "$(gettext "Invalid package file '%s'.")" "$pkgfile" return 1 fi -- 1.6.3