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
e014fc65
Commit
e014fc65
authored
Nov 22, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small improve print name
parent
246b2dfa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
epm-print
bin/epm-print
+9
-4
test_get_shortname.sh
tests/test_get_shortname.sh
+13
-0
test_name.sh
tests/test_name.sh
+9
-0
No files found.
bin/epm-print
View file @
e014fc65
...
@@ -42,20 +42,25 @@ print_binpkgfilelist()
...
@@ -42,20 +42,25 @@ print_binpkgfilelist()
|
grep
"^
$PKGNAME
[[:space:]].*"
|
cut
-f2
| xargs
-n1
-I
"{}"
echo
-n
"
$PKGDIR
/{} "
|
grep
"^
$PKGNAME
[[:space:]].*"
|
cut
-f2
| xargs
-n1
-I
"{}"
echo
-n
"
$PKGDIR
/{} "
}
}
PKGNAMEMASK
=
"
\(
.*
\)
-
\(
.*
\)
-
\(
.*
\)
"
# TODO: need try detect more strict
# TODO: package name mask for every system
#PKGNAMEMASK1="\(.*\)-\([^0-9].*[^0-9]\)-\(.*[0-9].*\)"
# mask to parse package name
PKGNAMEMASK
=
"
\(
.*
\)
-
\(
[0-9].*
\)
-
\(
.*[0-9].*
\)
"
print_name
()
print_name
()
{
{
echo
"
$@
"
| xargs
-n1
000
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\1
|g"
echo
"
$@
"
| xargs
-n1
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\1
|g"
}
}
print_version
()
print_version
()
{
{
echo
"
$1
"
| xargs
-n1
000
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\2
|g"
echo
"
$1
"
| xargs
-n1
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\2
|g"
}
}
print_release
()
print_release
()
{
{
echo
"
$1
"
| xargs
-n1
000
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\3
|g"
echo
"
$1
"
| xargs
-n1
echo
|
sed
-e
"s|
$PKGNAMEMASK
|
\3
|g"
}
}
print_pkgname
()
print_pkgname
()
...
...
tests/test_get_shortname.sh
View file @
e014fc65
#!/bin/sh
#!/bin/sh
get_numdelim
()
{
echo
-n
"
$@
"
|
sed
-e
"s|[^-]||g"
|
wc
-c
}
check
()
check
()
{
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
...
@@ -18,6 +23,7 @@ check_pkgfile()
...
@@ -18,6 +23,7 @@ check_pkgfile()
check_pkg
()
check_pkg
()
{
{
get_numdelim
"
$1
"
check
"
$1
"
"
$2
"
$(
../bin/epm print name
"
$1
"
)
check
"
$1
"
"
$2
"
$(
../bin/epm print name
"
$1
"
)
}
}
...
@@ -65,3 +71,10 @@ check_pkg pkg-source-less-1.0.spec pkg-source-less
...
@@ -65,3 +71,10 @@ check_pkg pkg-source-less-1.0.spec pkg-source-less
check_pkg pkg123-1.0.spec pkg123
check_pkg pkg123-1.0.spec pkg123
check_pkg pkg123[_-]1.0.spec pkg123
check_pkg pkg123[_-]1.0.spec pkg123
check_pkg pkg
*
.spec pkg
check_pkg pkg
*
.spec pkg
check_pkg qt5-webkit-doc qt5-webkit-doc
check_pkg geronimo-j2ee-management-1.1-api geronimo-j2ee-management-1.1-api
check_pkg i586-libgphoto2_port-12 i586-libgphoto2_port-12
check_pkg python-module-qscintilla2-qt4 python-module-qscintilla2-qt4
check_pkg python-module-qscintilla2-qt4-2.9-alt4 python-module-qscintilla2-qt4
check_pkg libqscintilla2-6-qt4 libqscintilla2-6-qt4
check_pkg libqscintilla2-6-qt4-2.5.1-alt4 libqscintilla2-6-qt4
tests/test_name.sh
0 → 100755
View file @
e014fc65
#!/bin/sh
../bin/epmqa
--short
>
$0
.0
# get two - packages list
cat
$0
.0 |
grep
".*-.*-.*"
|
sort
>
$0
.1
# try get their names, it does not have difference
cat
$0
.1 | ../bin/epm print name |
sort
>
$0
.1.1
cat
$0
.0 | ../bin/epm print name |
sort
>
$0
.2
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