Commit d21bfe20 authored by Vitaly Lipatov's avatar Vitaly Lipatov

addrepo: add check for empty DISTRVERSION

parent c859cf20
...@@ -51,6 +51,7 @@ __epm_addrepo_altlinux() ...@@ -51,6 +51,7 @@ __epm_addrepo_altlinux()
repo="$repo.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")" repo="$repo.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")"
;; ;;
archive) archive)
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
datestr="$2" datestr="$2"
echo "$datestr" | grep -Eq "^20[0-2][0-9]/[01][0-9]/[0-3][0-9]$" || fatal "use follow date format: 2017/12/31" echo "$datestr" | grep -Eq "^20[0-2][0-9]/[01][0-9]/[0-3][0-9]$" || fatal "use follow date format: 2017/12/31"
# TODO: func? # TODO: func?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment