Commit 751c2c42 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: add/remove autoimports

parent f80a56a6
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012, 2016 Etersoft # Copyright (C) 2012, 2017 Etersoft
# Copyright (C) 2012, 2016 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012, 2017 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -31,7 +31,7 @@ case $DISTRNAME in ...@@ -31,7 +31,7 @@ case $DISTRNAME in
local branch="$DISTRVERSION/branch" local branch="$DISTRVERSION/branch"
[ "$DISTRVERSION" = "Sisyphus" ] && branch="$DISTRVERSION" [ "$DISTRVERSION" = "Sisyphus" ] && branch="$DISTRVERSION"
# FIXME # FIXME
[ -n "$DISTRVERSION" ] || fatal "Empty $DISTRVERSION" [ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
local arch=$(uname -m) local arch=$(uname -m)
[ "$arch" = "i686" ] && arch="i586" [ "$arch" = "i686" ] && arch="i586"
echo "" | sudocmd tee -a /etc/apt/sources.list echo "" | sudocmd tee -a /etc/apt/sources.list
...@@ -44,9 +44,17 @@ case $DISTRNAME in ...@@ -44,9 +44,17 @@ case $DISTRNAME in
repo="$DISTRVERSION" repo="$DISTRVERSION"
return 0 return 0
;; ;;
autoimports)
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="$repo.$(echo "$DISTRVERSION" | tr "[A-Z]" "[a-z]")"
esac esac
assure_exists apt-repo assure_exists apt-repo
if [ -z "$repo" ] ; then
docmd apt-repo add branch
echo "etersoft"
return
fi
sudocmd apt-repo add "$repo" sudocmd apt-repo add "$repo"
return return
;; ;;
......
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012, 2016 Etersoft # Copyright (C) 2012, 2017 Etersoft
# Copyright (C) 2012, 2016 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2012, 2017 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
...@@ -20,11 +20,24 @@ ...@@ -20,11 +20,24 @@
epm_removerepo() epm_removerepo()
{ {
local repo="$(eval echo $quoted_args)" local repo="$(eval echo $quoted_args)"
case $PMTYPE in
apt-rpm) case $DISTRNAME in
ALTLinux)
case "$repo" in
autoimports)
info "remove autoimports repo"
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="$repo.$(echo "$DISTRVERSION" | tr "[A-Z]" "[a-z]")"
;;
esac
assure_exists apt-repo assure_exists apt-repo
sudocmd apt-repo rm "$repo" sudocmd apt-repo rm "$repo"
return
;; ;;
esac;
case $PMTYPE in
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
info "You need remove repo from /etc/apt/sources.list" info "You need remove repo from /etc/apt/sources.list"
;; ;;
......
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