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
Vladislav
eepm
Commits
035a95f5
Commit
035a95f5
authored
Jul 22, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.59.0
parent
5bd6a164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
33 deletions
+69
-33
epm.sh
packed/epm.sh
+47
-20
serv.sh
packed/serv.sh
+22
-13
No files found.
packed/epm.sh
View file @
035a95f5
#!/usr/bin/env bash
#
# Copyright (C) 2012-202
1
Etersoft
# Copyright (C) 2012-202
1
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-202
3
Etersoft
# Copyright (C) 2012-202
3
Vitaly Lipatov <lav@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
...
...
@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR
=
$PROGDIR
/../etc
EPMVERSION
=
"3.5
8.4
"
EPMVERSION
=
"3.5
9.0
"
# package, single (file), pipe, git
EPMMODE
=
"package"
...
...
@@ -49,7 +49,7 @@ load_helper()
{
local
shieldname
=
"loaded
$(
echo
"
$1
"
|
sed
-e
's|-||g'
)
"
# already loaded
eval
"
test -n
\"\$
$shieldname
\"
"
&&
debug
"Already loaded
$1
"
&&
return
eval
"
[ -n
\"\$
$shieldname
\"
]
"
&&
debug
"Already loaded
$1
"
&&
return
local
CMD
=
"
$SHAREDIR
/
$1
"
# do not use fatal() here, it can be initial state
...
...
@@ -245,12 +245,26 @@ rhas()
echo
"
$1
"
|
grep
-E
-q
--
"
$2
"
}
startwith
()
{
# rhas "$1" "^$2"
[[
"
$1
"
=
${
2
}*
]]
}
is_abs_path
()
{
#echo "$1" | grep -q "^/"
startwith
"
$1
"
"/"
}
is_dirpath
()
{
[
"
$1
"
=
"."
]
&&
return
$?
rhas
"
$1
"
"/"
# rhas "$1" "/"
startwith
"
$1
"
"/"
}
filter_strip_spaces
()
{
# possible use just
...
...
@@ -937,17 +951,17 @@ is_url()
echo
"
$1
"
|
grep
-q
"^[filehtps]*:/"
}
if
a
=
which which 2>/dev/null
>
/dev/null
;
then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is binary, not builtin shell command
if
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
print_command_path
()
{
a
=
which
--
"
$1
"
2>/dev/null
a
=
type
-fpP
--
"
$1
"
2>/dev/null
}
elif
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
elif
a
=
which which 2>/dev/null
>
/dev/null
;
then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is a binary, not builtin shell command
print_command_path
()
{
a
=
type
-fpP
--
"
$1
"
2>/dev/null
a
=
which
--
"
$1
"
2>/dev/null
}
else
print_command_path
()
...
...
@@ -984,11 +998,6 @@ subst()
}
fi
is_abs_path
()
{
echo
"
$1
"
|
grep
-q
"^/"
}
check_core_commands
()
{
#which which >/dev/null || fatal "Can't find which command (which or debianutils package is missed?)"
...
...
@@ -6032,12 +6041,14 @@ __get_app_package()
__list_all_app
()
{
for
i
in
$psdir
/
*
.sh
;
do
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
cd
$psdir
||
fatal
for
i
in
*
.sh
;
do
local
name
=
${
i
/.sh/
}
[
-n
"
$IGNOREi586
"
]
&&
startwith
"
$name
"
"i586-"
&&
continue
startwith
"
$name
"
"common"
&&
continue
echo
"
$name
"
done
cd
-
>
/dev/null
}
__list_all_packages
()
...
...
@@ -16803,6 +16814,22 @@ fi
epm_main
()
{
# fast call for tool
if
[
"
$1
"
=
"tool"
]
;
then
shift
epm_cmd
=
tool
eval
epm_
$epm_cmd
"
$@
"
exit
fi
if
[
"
$1
"
=
"--inscript"
]
&&
[
"
$2
"
=
"tool"
]
;
then
shift
2
epm_cmd
=
tool
eval
epm_
$epm_cmd
"
$@
"
exit
fi
set_pm_type
check_tty
...
...
packed/serv.sh
View file @
035a95f5
...
...
@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR
=
$PROGDIR
/../etc
EPMVERSION
=
"3.5
8.4
"
EPMVERSION
=
"3.5
9.0
"
# package, single (file), pipe, git
EPMMODE
=
"package"
...
...
@@ -246,12 +246,26 @@ rhas()
echo
"
$1
"
|
grep
-E
-q
--
"
$2
"
}
startwith
()
{
# rhas "$1" "^$2"
[[
"
$1
"
=
${
2
}*
]]
}
is_abs_path
()
{
#echo "$1" | grep -q "^/"
startwith
"
$1
"
"/"
}
is_dirpath
()
{
[
"
$1
"
=
"."
]
&&
return
$?
rhas
"
$1
"
"/"
# rhas "$1" "/"
startwith
"
$1
"
"/"
}
filter_strip_spaces
()
{
# possible use just
...
...
@@ -938,17 +952,17 @@ is_url()
echo
"
$1
"
|
grep
-q
"^[filehtps]*:/"
}
if
a
=
which which 2>/dev/null
>
/dev/null
;
then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is binary, not builtin shell command
if
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
print_command_path
()
{
a
=
which
--
"
$1
"
2>/dev/null
a
=
type
-fpP
--
"
$1
"
2>/dev/null
}
elif
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
elif
a
=
which which 2>/dev/null
>
/dev/null
;
then
# the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is a binary, not builtin shell command
print_command_path
()
{
a
=
type
-fpP
--
"
$1
"
2>/dev/null
a
=
which
--
"
$1
"
2>/dev/null
}
else
print_command_path
()
...
...
@@ -985,11 +999,6 @@ subst()
}
fi
is_abs_path
()
{
echo
"
$1
"
|
grep
-q
"^/"
}
check_core_commands
()
{
#which which >/dev/null || fatal "Can't find which command (which or debianutils package is missed?)"
...
...
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