Commit 781b82a7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repo add: fix quoting, add --force support

parent 54fbdf1e
...@@ -301,8 +301,10 @@ __epm_addrepo_altlinux() ...@@ -301,8 +301,10 @@ __epm_addrepo_altlinux()
;; ;;
esac esac
# don't add again if [ -z "$force" ] ; then
epm repo list --quiet | grep -q -F "$repo" && return 0 # don't add again
epm repo list --quiet | grep -q -F "$repo" && return 0
fi
if echo "$repo" | grep -q "https://" ; then if echo "$repo" | grep -q "https://" ; then
local mh="$(echo /usr/lib*/apt/methods/https)" local mh="$(echo /usr/lib*/apt/methods/https)"
...@@ -429,12 +431,11 @@ local repo="$*" ...@@ -429,12 +431,11 @@ local repo="$*"
case $BASEDISTRNAME in case $BASEDISTRNAME in
"alt") "alt")
# Note! Don't use quotes here __epm_addrepo_altlinux "$@"
__epm_addrepo_altlinux $repo
return return
;; ;;
"astra") "astra")
__epm_addrepo_astra $repo __epm_addrepo_astra "$@"
return return
;; ;;
"apk") "apk")
...@@ -444,8 +445,7 @@ esac ...@@ -444,8 +445,7 @@ esac
case $PMTYPE in case $PMTYPE in
apt-dpkg) apt-dpkg)
# Note! Don't use quotes here __epm_addrepo_deb "$@"
__epm_addrepo_deb $repo
;; ;;
aptitude-dpkg) aptitude-dpkg)
info "You need manually add repo to /etc/apt/sources.list (TODO)" info "You need manually add repo to /etc/apt/sources.list (TODO)"
......
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