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
33ac0aee
Commit
33ac0aee
authored
Jul 18, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit
parents
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
218 additions
and
0 deletions
+218
-0
README
bin/README
+2
-0
epm
bin/epm
+87
-0
epm-install
bin/epm-install
+60
-0
epm-sh-functions
bin/epm-sh-functions
+69
-0
No files found.
bin/README
0 → 100644
View file @
33ac0aee
See detailed description in russian at
http://wiki.etersoft.ru/Epm
bin/epm
0 → 100755
View file @
33ac0aee
#!/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.
#
# HACK
#ETERBUILDBIN=/usr/bin
# FIXME
#. /usr/share/eterbuild/eterbuild
#load_mod rpm git buildsrpm
.
$(
dirname
$0
)
/epm-sh-functions
#############################
phelp
()
{
echo
"
$Descr
$Usage
-i|install install packages
"
}
name
=
${
0
##*/
}
Usage
=
"Usage:
$name
[-i|install] [package name(s), package files]..."
Descr
=
"
$name
- etersoft package manager"
verbose
=
1
epm_cmd
=
pkg_files
=
pkg_names
=
for
opt
in
"
$@
"
;
do
case
$opt
in
-h
|
--help
|
help
)
phelp
;
exit
0
;;
-v
|
--verbose
)
verbose
=
1
;;
-i
|
install
)
epm_cmd
=
install
;;
*
)
if
[
-f
"
$opt
"
]
;
then
pkg_files
=
"
$pkgfiles
$opt
"
else
pkg_names
=
"
$pkgnames
$opt
"
fi
;;
esac
done
pkg_files
=
$(
strip_spaces
"
$pkg_files
"
)
pkg_names
=
$(
strip_spaces
"
$pkg_names
"
)
echover
"pkg_files=
$pkg_files
"
echover
"pkg_names=
$pkg_names
"
DISTRVENDOR
=
distr_vendor
[
-n
"
$DISTRNAME
"
]
||
DISTRNAME
=
$(
$DISTRVENDOR
-d
)
[
-n
"
$DISTRVERSION
"
]
||
DISTRVERSION
=
$(
$DISTRVENDOR
-v
)
set_target_pkg_env
[
-n
"
$epm_cmd
"
]
||
fatal
"Run without command"
epm_cmd_file
=
$(
dirname
$0
)
/epm-
$epm_cmd
[
-r
"
$epm_cmd_file
"
]
||
fatal
"Have no
$epm_cmd_file
command file"
.
$epm_cmd_file
eval
epm_
$epm_cmd
bin/epm-install
0 → 100644
View file @
33ac0aee
#!/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.
#
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
get_install_package_command
()
{
local
DISTRNAME
=
$1
local
INAC
=
$2
local
CMD
local
RET
=
0
case
$DISTRNAME
in
"ALTLinux"
|
"Ubuntu"
|
"Debian"
|
"PCLinux"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"apt-get install"
||
CMD
=
"apt-get -y --force-yes install"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"yum install"
||
CMD
=
"yum -y install"
;;
"Mandriva"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"urpmi --no-verify-rpm"
||
CMD
=
"urpmi --auto --no-verify-rpm"
;;
"ROSA"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"urpmi --no-verify-rpm"
||
CMD
=
"urpmi --auto --no-verify-rpm"
;;
"SUSE|SLED|SLES"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"zypper --non-interactive install"
||
CMD
=
"yes | zypper --non-interactive install"
;;
*
)
RET
=
1
CMD
=
"echo
\"
Do not known install command for DISTRNAME
$DISTRNAME
\"
"
;;
esac
echo
$CMD
return
$RET
}
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
}
bin/epm-sh-functions
0 → 100644
View file @
33ac0aee
#!/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.
#
echover
()
{
[
-n
"
$verbose
"
]
||
return
echo
"
$*
"
}
# Used DISTRNAME
set_target_pkg_env
()
{
[
"
$(
$DISTRVENDOR
-V
)
"
-ge
"20120519"
]
||
fatal
"update rpm-build-altlinux-compat package to get new
$DISTRVENDOR
command"
[
-n
"
$DISTRNAME
"
]
||
fatal
"Run set_target_pkg_env without DISTRNAME"
PKGFORMAT
=
$(
$DISTRVENDOR
-p
"
$DISTRNAME
"
)
PKGVENDOR
=
$(
$DISTRVENDOR
-s
"
$DISTRNAME
"
)
RPMVENDOR
=
$(
$DISTRVENDOR
-n
"
$DISTRNAME
"
)
}
# Print command line and run command line
docmd
()
{
#SETCOLOR_SUCCESS
echo
"
\$
$@
"
#SETCOLOR_NORMAL
"
$@
"
}
filter_strip_spaces
()
{
# possible use just
#xargs echo
sed
-e
"s|
\+
| |g"
|
\
sed
-e
"s|^ ||"
|
sed
-e
"s|
\$
||"
}
strip_spaces
()
{
echo
"
$*
"
| filter_strip_spaces
}
# Print error message and stop the program
fatal
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Error in
$0
:
$@
"
>
&2
else
echog
"Error in
$0
:
$@
"
>
&2
fi
exit
1
}
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