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
993b14ae
Commit
993b14ae
authored
Oct 28, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed
parent
867172d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
16 deletions
+33
-16
epm.sh
packed/epm.sh
+31
-14
serv.sh
packed/serv.sh
+2
-2
No files found.
packed/epm.sh
View file @
993b14ae
...
@@ -2225,6 +2225,8 @@ epm_download()
...
@@ -2225,6 +2225,8 @@ epm_download()
__epm_korinf_site_mask
()
{
__epm_korinf_site_mask
()
{
local
MASK
=
"
$1
"
local
MASK
=
"
$1
"
local
archprefix
=
""
local
archprefix
=
""
# short hack to install needed package
rhas
"
$MASK
"
"[-_]"
||
MASK
=
"
$MASK
[-_][0-9]"
# set arch for Korinf compatibility
# set arch for Korinf compatibility
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
archprefix
=
"x86_64/"
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
archprefix
=
"x86_64/"
echo
"http://updates.etersoft.ru/pub/Korinf/
$archprefix
$(
$DISTRVENDOR
-e
)
/
$MASK
*.
$(
$DISTRVENDOR
-p
)
"
echo
"http://updates.etersoft.ru/pub/Korinf/
$archprefix
$(
$DISTRVENDOR
-e
)
/
$MASK
*.
$(
$DISTRVENDOR
-p
)
"
...
@@ -2232,17 +2234,20 @@ __epm_korinf_site_mask() {
...
@@ -2232,17 +2234,20 @@ __epm_korinf_site_mask() {
__epm_korinf_list
()
{
__epm_korinf_list
()
{
local
MASK
=
"
$1
"
local
MASK
=
"
$1
"
showcmd eget
--list
"
$(
__epm_korinf_site_mask
"
$MASK
"
)
"
MASK
=
"
$(
__epm_korinf_site_mask
"
$MASK
"
)
"
eget
--list
"
$(
__epm_korinf_site
"
$MASK
"
)
"
|
sort
showcmd eget
--list
"
$MASK
"
eget
--list
"
$MASK
"
|
sort
}
}
__epm_korinf_install
(){
__epm_korinf_install
()
{
local
PACKAGE
=
"
$1
"
local
PACKAGE
=
"
$1
"
epm
install
$(
__epm_korinf_site_mask
"
$PACKAGE
$(
get_pkg_name_delimiter
)
"
)
# due Error: Can't use epm call from the piped script
#epm install $(__epm_korinf_site_mask "$PACKAGE")
pkg_names
=
''
pkg_files
=
''
pkg_urls
=
"
$(
__epm_korinf_site_mask
"
$PACKAGE
"
)
"
epm_install
}
}
epm_epm_install
(){
epm_epm_install
()
{
local
i
local
i
local
pkglist
=
"
$*
"
local
pkglist
=
"
$*
"
...
@@ -3539,7 +3544,7 @@ __remove_installed_app()
...
@@ -3539,7 +3544,7 @@ __remove_installed_app()
[
-d
"
$epm_vardir
"
]
||
return
0
[
-d
"
$epm_vardir
"
]
||
return
0
local
i
local
i
for
i
in
$*
;
do
for
i
in
$*
;
do
$SUDO
sed
-i
'/^$i$/d'
$epm_vardir
/installed-app
$SUDO
sed
-i
"/^
$i$/
d"
$epm_vardir
/installed-app
done
done
return
0
return
0
}
}
...
@@ -3593,14 +3598,15 @@ fi
...
@@ -3593,14 +3598,15 @@ fi
if
[
"
$1
"
=
"--remove"
]
;
then
if
[
"
$1
"
=
"--remove"
]
;
then
shift
shift
echo
"Installed::"
#__check_installed_app "$1" || fatal "$1 is not installed"
#__check_installed_app "$1" || fatal "$1 is not installed"
__epm_prescription_run
$1
--remove
&&
__remove_installed_app
"
$@
"
__epm_prescription_run
$1
--remove
__remove_installed_app
"
$@
"
exit
exit
fi
fi
if
[
"
$1
"
=
"--list"
]
;
then
if
[
"
$1
"
=
"--list"
]
||
[
"
$1
"
=
"--installed"
]
;
then
shift
shift
echo
"Installed:"
local
i
local
i
for
i
in
$(
__list_installed_app
)
;
do
for
i
in
$(
__list_installed_app
)
;
do
printf
" %-20s - %s
\n
"
"
$i
"
"
$(
$psdir
/
$i
.sh
--description
2>/dev/null
)
"
printf
" %-20s - %s
\n
"
"
$i
"
"
$(
$psdir
/
$i
.sh
--description
2>/dev/null
)
"
...
@@ -3613,11 +3619,13 @@ if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then
...
@@ -3613,11 +3619,13 @@ if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then
for
i
in
$psdir
/
*
.sh
;
do
for
i
in
$psdir
/
*
.sh
;
do
printf
" %-20s - %s
\n
"
"
$(
basename
$i
.sh
)
"
"
$(
$i
--description
2>/dev/null
)
"
printf
" %-20s - %s
\n
"
"
$(
basename
$i
.sh
)
"
"
$(
$i
--description
2>/dev/null
)
"
done
done
echo
echo
"run epm play --list to list installed only or --remove to remove one"
exit
exit
fi
fi
__check_installed_app
"
$1
"
&&
info
"
$1
is already installed"
&&
exit
1
__check_installed_app
"
$1
"
&&
info
"
$1
is already installed"
&&
exit
1
__epm_prescription_run
"
$1
"
--run
&&
__save_installed_app
$1
__epm_prescription_run
"
$1
"
--run
&&
__save_installed_app
"
$1
"
}
}
# File bin/epm-print:
# File bin/epm-print:
...
@@ -5269,6 +5277,10 @@ epm_remove()
...
@@ -5269,6 +5277,10 @@ epm_remove()
nodeps
=
"--test"
nodeps
=
"--test"
APTOPTIONS
=
"--simulate"
APTOPTIONS
=
"--simulate"
;;
;;
apt-deb
)
nodeps
=
"--simulate"
APTOPTIONS
=
"--simulate"
;;
*
)
*
)
return
return
;;
;;
...
@@ -5535,7 +5547,7 @@ __fix_spec()
...
@@ -5535,7 +5547,7 @@ __fix_spec()
# drop forbidded paths
# drop forbidded paths
# https://bugzilla.altlinux.org/show_bug.cgi?id=38842
# https://bugzilla.altlinux.org/show_bug.cgi?id=38842
for
i
in
/ /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run
\
for
i
in
/ /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run
\
/etc/cron.daily /usr/share/man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu
;
do
/etc/cron.daily /usr/share/
icons /usr/share/pixmaps /usr/share/
man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu
;
do
sed
-i
-e
"s|^%dir
\"
$i
/*
\"
$|
|"
\
sed
-i
-e
"s|^%dir
\"
$i
/*
\"
$|
|"
\
-e
"s|^
\"
$i
/*
\"
$|
|"
\
-e
"s|^
\"
$i
/*
\"
$|
|"
\
-e
"s|^
$i
/*
$|
|"
\
-e
"s|^
$i
/*
$|
|"
\
...
@@ -6789,6 +6801,9 @@ __epm_check_vendor()
...
@@ -6789,6 +6801,9 @@ __epm_check_vendor()
# don't check vendor if there are forced script options
# don't check vendor if there are forced script options
[
-n
"
$scripts$noscripts
"
]
&&
return
[
-n
"
$scripts$noscripts
"
]
&&
return
# only ALT
[
"
$DISTRNAME
"
=
"ALTLinux"
]
||
return
local
i
local
i
for
i
in
$*
;
do
for
i
in
$*
;
do
local
vendor
local
vendor
...
@@ -8356,7 +8371,7 @@ fi
...
@@ -8356,7 +8371,7 @@ fi
MASK
=
$(
basename
"
$1
"
)
MASK
=
$(
basename
"
$1
"
)
# If have no wildcard symbol like asterisk, just download
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
;
then
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
sget
"
$1
"
"
$TARGETFILE
"
sget
"
$1
"
"
$TARGETFILE
"
return
return
fi
fi
...
@@ -8938,7 +8953,7 @@ Examples:
...
@@ -8938,7 +8953,7 @@ Examples:
print_version
()
print_version
()
{
{
echo
"EPM package manager version 3.6.
3
https://wiki.etersoft.ru/Epm"
echo
"EPM package manager version 3.6.
5
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Running on
$(
$DISTRVENDOR
-e
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2020"
echo
"Copyright (c) Etersoft 2012-2020"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
@@ -8948,7 +8963,7 @@ print_version()
...
@@ -8948,7 +8963,7 @@ print_version()
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Descr
=
"epm - EPM package manager"
Descr
=
"epm - EPM package manager"
EPMVERSION
=
3.6.
3
EPMVERSION
=
3.6.
5
verbose
=
verbose
=
quiet
=
quiet
=
nodeps
=
nodeps
=
...
@@ -9356,6 +9371,8 @@ case $epm_cmd in
...
@@ -9356,6 +9371,8 @@ case $epm_cmd in
;;
;;
esac
esac
[
-n
"
$verbose$EPM_VERBOSE
"
]
&&
showcmd
"
$0
$*
"
# Run helper for command with natural args
# Run helper for command with natural args
eval
epm_
$epm_cmd
$quoted_args
eval
epm_
$epm_cmd
$quoted_args
# return last error code (from subroutine)
# return last error code (from subroutine)
packed/serv.sh
View file @
993b14ae
...
@@ -2081,7 +2081,7 @@ fi
...
@@ -2081,7 +2081,7 @@ fi
MASK
=
$(
basename
"
$1
"
)
MASK
=
$(
basename
"
$1
"
)
# If have no wildcard symbol like asterisk, just download
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
;
then
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
sget
"
$1
"
"
$TARGETFILE
"
sget
"
$1
"
"
$TARGETFILE
"
return
return
fi
fi
...
@@ -2734,7 +2734,7 @@ print_version()
...
@@ -2734,7 +2734,7 @@ print_version()
local
on_text
=
"(host system)"
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.6.
3
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.6.
5
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2019"
echo
"Copyright (c) Etersoft 2012-2019"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
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