Commit 33adcc60 authored by Danil Mikhailov's avatar Danil Mikhailov

epm_install: added command for install or update eepm package from all in one script

parent 2cddd346
......@@ -268,6 +268,9 @@ check_command()
site|url) # HELPCMD: open package's site in a browser (use -p for open packages.altlinux.org site)
epm_cmd=site
;;
ei|epminstall|selfinstall) # HELPCMD: install or update eepm from all in one script
epm_cmd=epm_install
;;
print) # HELPCMD: print various info, run epm print help for details
epm_cmd=print
;;
......
#!/bin/sh
# Copyright (C) 2016 Etersoft
# Copyright (C) 2016 Danil Mikhailov <danil@etersoft.ru>
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
etersoft_updates_site="http://updates.etersoft.ru/pub/Etersoft/Sisyphus/$($DISTRVENDOR -e)/"
download_dir="/tmp"
download_epm(){
download_link=$etersoft_updates_site$(wget -qO- $etersoft_updates_site/ | grep -m1 -Eo "eepm[^\"]+\.$($DISTRVENDOR -p)" | tail -n1) #"
eepm_package="$download_dir/$(basename $download_link)"
wget -O $eepm_package $download_link
}
epm_epm_install(){
download_epm || fatal "Error. Check download link: $download_link"
epm i $eepm_package || fatal "Check package: $(ls eepm*)"
}
\ No newline at end of file
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