Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
794f64d5
Commit
794f64d5
authored
Jul 19, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite epm-install and separate to epm-simulate
parent
7aba847f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
29 deletions
+89
-29
epm-install
bin/epm-install
+34
-29
epm-simulate
bin/epm-simulate
+55
-0
No files found.
bin/epm-install
View file @
794f64d5
...
...
@@ -18,33 +18,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# TODO
epm_install_sim
()
{
case
$DISTRNAME
in
"ALTLinux"
|
"PCLinux"
)
CMD
=
"apt-get --simulate install"
;;
"Ubuntu"
|
"Debian"
)
CMD
=
"apt-get --simulate install"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
CMD
=
"yum provides"
;;
"Mandriva"
)
CMD
=
"urpmi --test --auto"
;;
"SUSE"
)
CMD
=
"zypper --non-interactive install --dry-run"
;;
*
)
echo
"Do not known install command for DISTRNAME
$DISTRNAME
"
exit
2
;;
esac
}
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
get_install_package_command
()
{
...
...
@@ -77,11 +50,43 @@ get_install_package_command()
return
$RET
}
#is_alt && FANCYPERCENT=--fancypercent
#docmd $SUDO rpm -Uvh $FANCYPERCENT "$@"
epm_install
()
{
[
-n
"
$pkg_files$pkg_names
"
]
||
fatal
"Run install without packages"
CMD
=
$(
get_install_package_command
$DISTRNAME
interactive
)
docmd
$CMD
$pkg_files
$pkg_names
if
[
-n
"
$pkg_names
"
]
;
then
CMD
=
$(
get_install_package_command
$DISTRNAME
interactive
)
docmd
$SUDO
$CMD
$pkg_names
fi
[
-n
"
$pkg_files
"
]
||
return
case
$DISTRNAME
in
ALTLinux|PCLinux
)
docmd
$SUDO
apt-get
install
$pkg_files
return
;;
Ubuntu|Debian|Mint
)
docmd
$SUDO
dpkg
-i
$pkg_files
docmd
$SUDO
apt-get
-f
install
return
;;
esac
case
$PMTYPE
in
urpm-rpm
)
docmd
$SUDO
urpmi
--no-verify-rpm
$pkg_files
return
;;
yum-rpm
)
docmd
$SUDO
yum
install
$pkg_files
return
;;
zypper-rpm
)
docmd
$SUDO
zypper
install
$pkg_files
return
;;
*
)
fatal
"DO not know appropriate install command for
$PMTYPE
"
esac
}
bin/epm-simulate
0 → 100644
View file @
794f64d5
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# TODO
epm_install_sim
()
{
case
$DISTRNAME
in
"ALTLinux"
|
"PCLinux"
)
CMD
=
"apt-get --simulate install"
;;
"Ubuntu"
|
"Debian"
)
CMD
=
"apt-get --simulate install"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
CMD
=
"yum provides"
;;
"Mandriva"
)
CMD
=
"urpmi --test --auto"
;;
"SUSE"
)
CMD
=
"zypper --non-interactive install --dry-run"
;;
*
)
fatal
"Do not known install command for DISTRNAME
$DISTRNAME
"
;;
esac
echo
$CMD
}
epm_simulate
()
{
[
-n
"
$pkg_names
"
]
||
fatal
"Run install without packages"
CMD
=
$(
epm_install_sim
$DISTRNAME
)
docmd
$SUDO
$CMD
$pkg_names
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment