Commit ba89b172 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm ei: add support to set Korinf URL

parent aa499218
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
load_helper epm-install load_helper epm-install
# default repo
EPM_KORINF_REPO_URL="https://updates.etersoft.ru/pub/Korinf"
__epm_korinf_site_mask() { __epm_korinf_site_mask() {
local MASK="$1" local MASK="$1"
...@@ -28,9 +30,9 @@ __epm_korinf_site_mask() { ...@@ -28,9 +30,9 @@ __epm_korinf_site_mask() {
rhas "$MASK" "[-_]" || MASK="$MASK[-_][0-9]" rhas "$MASK" "[-_]" || MASK="$MASK[-_][0-9]"
# set arch for Korinf compatibility # set arch for Korinf compatibility
[ "$($DISTRVENDOR -a)" = "x86_64" ] && archprefix="x86_64/" [ "$($DISTRVENDOR -a)" = "x86_64" ] && archprefix="x86_64/"
local URL="http://updates.etersoft.ru/pub/Korinf/$archprefix$($DISTRVENDOR -e)" local URL="$EPM_KORINF_REPO_URL/$archprefix$($DISTRVENDOR -e)"
if ! eget --check "$URL" ; then if ! eget --check "$URL" ; then
tURL="http://updates.etersoft.ru/pub/Korinf/$archprefix$($DISTRVENDOR --vendor-name)/$($DISTRVENDOR --repo-name)" tURL="$EPM_KORINF_REPO_URL/$archprefix$($DISTRVENDOR --vendor-name)/$($DISTRVENDOR --repo-name)"
docmd eget --check "$tURL" && URL="$tURL" docmd eget --check "$tURL" && URL="$tURL"
fi fi
echo "$URL/$MASK*.$PKGFORMAT" echo "$URL/$MASK*.$PKGFORMAT"
...@@ -67,6 +69,7 @@ epm_epm_install_help() ...@@ -67,6 +69,7 @@ epm_epm_install_help()
get_help HELPCMD $SHAREDIR/epm-epm_install get_help HELPCMD $SHAREDIR/epm-epm_install
cat <<EOF cat <<EOF
Default Korinf repository: $EPM_KORINF_REPO_URL
Examples: Examples:
epm ei [epm|eepm] - install latest eepm (default action) epm ei [epm|eepm] - install latest eepm (default action)
...@@ -78,6 +81,11 @@ EOF ...@@ -78,6 +81,11 @@ EOF
epm_epm_install() { epm_epm_install() {
if is_url "$1" ; then
EPM_KORINF_REPO_URL="$1"
info "Using $EPM_KORINF_REPO_URL repo ..."
shift
fi fi
case "$1" in case "$1" in
......
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