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
4dc6ae2a
Commit
4dc6ae2a
authored
Jul 22, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: speed up tool call
parent
e786a493
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
epm
bin/epm
+21
-3
No files found.
bin/epm
View file @
4dc6ae2a
#!/usr/bin/env bash
#!/usr/bin/env bash
#
#
# Copyright (C) 2012-202
1
Etersoft
# Copyright (C) 2012-202
3
Etersoft
# Copyright (C) 2012-202
1
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-202
3
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# 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
# it under the terms of the GNU Affero General Public License as published by
...
@@ -49,7 +49,7 @@ load_helper()
...
@@ -49,7 +49,7 @@ load_helper()
{
{
local
shieldname
=
"loaded
$(
echo
"
$1
"
|
sed
-e
's|-||g'
)
"
local
shieldname
=
"loaded
$(
echo
"
$1
"
|
sed
-e
's|-||g'
)
"
# already loaded
# already loaded
eval
"
test -n
\"\$
$shieldname
\"
"
&&
debug
"Already loaded
$1
"
&&
return
eval
"
[ -n
\"\$
$shieldname
\"
]
"
&&
debug
"Already loaded
$1
"
&&
return
local
CMD
=
"
$SHAREDIR
/
$1
"
local
CMD
=
"
$SHAREDIR
/
$1
"
# do not use fatal() here, it can be initial state
# do not use fatal() here, it can be initial state
...
@@ -62,6 +62,24 @@ load_helper()
...
@@ -62,6 +62,24 @@ load_helper()
load_helper epm-sh-functions
load_helper epm-sh-functions
# fast call for tool
if
[
"
$1
"
=
"tool"
]
;
then
shift
epm_cmd
=
tool
load_helper epm-
$epm_cmd
eval
epm_
$epm_cmd
"
$@
"
exit
fi
if
[
"
$1
"
=
"--inscript"
]
&&
[
"
$2
"
=
"tool"
]
;
then
shift
2
epm_cmd
=
tool
load_helper epm-
$epm_cmd
eval
epm_
$epm_cmd
"
$@
"
exit
fi
set_pm_type
set_pm_type
check_tty
check_tty
...
...
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