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
Nurlan
eepm
Commits
7e1f5073
Commit
7e1f5073
authored
Oct 24, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-print: add arch depend constructname support
parent
200df9d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
epm-print
bin/epm-print
+19
-0
epm-sh-functions
bin/epm-sh-functions
+10
-0
No files found.
bin/epm-print
View file @
7e1f5073
...
...
@@ -124,6 +124,21 @@ compare_version()
rpmevrcmp
"
$@
"
}
# construct package file name.
# name version [arch] [pkgtype]
construct_name
()
{
local
name
=
"
$1
"
local
version
=
"
$2
"
local arch
=
"
$3
"
local
pkgtype
=
"
$4
"
[
-n
"
$arch
"
]
||
arch
=
"
$(
distro_info
--distro-arch
)
"
[
-n
"
$pkgtype
"
]
||
pkgtype
=
"
$(
distro_info
-p
)
"
local
ds
=
$(
get_pkg_name_delimiter
$pkgtype
)
echo
"
${
name
}
$ds
${
version
}${
ds
/-/.
}
$arch
.
$pkgtype
"
}
epm_print
()
{
local
WHAT
=
"
$1
"
...
...
@@ -161,6 +176,7 @@ cat <<EOF
epm print specname from filename NN print spec filename for the source package file
epm print binpkgfilelist in DIR for NN list binary package(s) filename(s) from DIR for the source package file
epm print compare [package] version N1 N2 compare (package) versions and print -1, 0, 1
epm print constructname <name> <version> [arch] [ pkgtype] print distro dependend package filename from args name version arch pkgtype
EOF
;;
"name"
)
...
...
@@ -250,6 +266,9 @@ EOF
compare_version
"
$1
"
"
$2
"
#fi
;;
"constructname"
)
construct_name
"
$@
"
;;
*
)
fatal
"Unknown command
$
epm print
$WHAT
. Use epm print help for get help."
;;
...
...
bin/epm-sh-functions
View file @
7e1f5073
...
...
@@ -616,3 +616,13 @@ assure_distr()
[
-n
"
$2
"
]
&&
TEXT
=
"
$2
"
[
"
$DISTRNAME
"
=
"
$1
"
]
||
fatal
"
$TEXT
supported only for
$1
distro"
}
# return delimiter sign in depend of package type
get_pkg_name_delimiter
()
{
local
pkgtype
=
"
$1
"
[
-n
"
$pkgtype
"
]
||
pkgtype
=
"
$(
$DISTRVENDOR
-p
)
"
[
"
$pkgtype
"
=
"deb"
]
&&
echo
"_"
&&
return
echo
"-"
}
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