Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
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
korinf
etersoft-build-utils
Commits
10bc7fb2
Commit
10bc7fb2
authored
Aug 04, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmU, rpmqf - put redirect to eepm
parent
7a59d995
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
86 deletions
+4
-86
rpmU
bin/rpmU
+2
-16
rpmqf
bin/rpmqf
+2
-70
No files found.
bin/rpmU
View file @
10bc7fb2
#!/bin/sh
# 2004-2005,2010 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
ALLOW_ROOT_USER
=
1
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod gettext
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echog
"rpmU - the same as [sudo] rpm -Uvh - update package"
echog
"Usage: rpmU [package(s)]"
exit
0
fi
is_alt
&&
FANCYPERCENT
=
--fancypercent
docmd
$SUDO
rpm
-Uvh
$FANCYPERCENT
"
$@
"
echo
"Use epmu from epm package manager (eepm) instead"
exec
epmu
"
$@
"
bin/rpmqf
View file @
10bc7fb2
#!/bin/sh
# 2003-2006, 2009, 2011 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# Выводит, к какому пакету относится указанный файл, находимый через which
# Параметры:
# - название файл
# TODO not -i only, we need any key
echo
"Use epmqf from epm package manager (eepm) instead"
exec
epmqf
"
$@
"
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec rpm
if
[
"
$1
"
=
"-h"
]
;
then
echo
"rpmqf - the same as rpm -qf, but use which for search command place"
exit
0
fi
if
[
"
$1
"
=
"-i"
]
;
then
ARG
=
$1
shift
fi
[
-n
"
$1
"
]
||
fatal
"Run with command name. See
$0
-h also."
# use and modify TOFILE recursively
real_file
()
{
local
LINKTO1 LINKTO
local
TOFILE
# get canonical path
if
[
-e
"
$1
"
]
;
then
TOFILE
=
$1
else
TOFILE
=
`
which
$1
2>/dev/null
||
echo
$1
`
if
[
"
$TOFILE
"
!=
"
$1
"
]
;
then
echo
"Note:
$1
is placed as
$TOFILE
"
fi
fi
# get value of symbolic link
if
[
-L
"
$TOFILE
"
]
;
then
LINKTO
=
`
readlink
"
$TOFILE
"
`
echo
"Note:
$TOFILE
is link to
$LINKTO
"
real_file
"
$LINKTO
"
fi
FULLFILEPATH
=
`
readlink
-f
$TOFILE
`
}
real_file
"
$1
"
parse_cmd_pre
""
"
$@
"
case
$PKGFORMAT
in
"rpm"
)
rpmquery
-f
$ARG
"
$FULLFILEPATH
"
;;
"deb"
)
DPKG
=
dpkg
PACKAGE
=
$(
$DPKG
-S
"
$FULLFILEPATH
"
2>/dev/null |
head
-n1
|
sed
-e
"s|:.*||"
)
[
-n
"
$PACKAGE
"
]
||
fatal
"Can't find package for
$FULLFILEPATH
"
VERSION
=
$(
$DPKG
-s
"
$PACKAGE
"
2>/dev/null |
grep
"Version:"
|
sed
-e
"s|Version: ||g"
)
[
-n
"
$VERSION
"
]
&&
echo
"
$PACKAGE
-
$VERSION
"
||
fatal
"Can't extract version for
$PACKAGE
package"
;;
*
)
fatal
"Unsupported package system"
;;
esac
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