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
4dd0e63a
Commit
4dd0e63a
authored
Jul 22, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play common.sh: add print_common_path here
parent
35f93fe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
common.sh
play.d/common.sh
+27
-6
No files found.
play.d/common.sh
View file @
4dd0e63a
...
...
@@ -19,10 +19,30 @@ cd_to_temp_dir()
cd
$PKGDIR
||
fatal
}
# print a path to the command if exists in $PATH
if
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
print_command_path
()
{
a
=
type
-fpP
--
"
$1
"
2>/dev/null
}
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
=
which
--
"
$1
"
2>/dev/null
}
else
print_command_path
()
{
a
=
type
"
$1
"
2>/dev/null |
sed
-e
's|.* /|/|'
}
fi
# check if <arg> is a real command
is_command
()
{
epm tool whic
h
"
$1
"
>
/dev/null
print_command_pat
h
"
$1
"
>
/dev/null
}
...
...
@@ -38,9 +58,14 @@ check_tty
# showcmd "$*"
#}
# support for direct run a play script
if
[
-x
"../bin/epm"
]
;
then
export
PATH
=
"
$(
realpath
../bin
)
:
$PATH
"
fi
# add to all epm calls
EPM
=
"
$(
epm tool which epm
)
"
||
fatal
#EPM="$(epm tool which epm)" || fatal
EPM
=
"
$(
print_command_path epm
)
"
||
fatal
epm
()
{
#if [ "$1" = "tool" ] ; then
...
...
@@ -192,10 +217,6 @@ is_repacked_package()
}
# support for direct run a play script
if
[
-x
"../bin/epm"
]
;
then
export
PATH
=
"
$(
realpath
../bin
)
:
$PATH
"
fi
# set PKGNAME to $BASEPKGNAME-$VERSION if $VERSION is found in PRODUCTALT
[
-n
"
$PRODUCTALT
"
]
&&
check_alternative_pkgname
...
...
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