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
c05834f0
Commit
c05834f0
authored
Jan 12, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do value link recursively
parent
1d692ebc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
rpmqf
bin/rpmqf
+25
-18
No files found.
bin/rpmqf
View file @
c05834f0
#!/bin/sh
# 2003-2006 (c) Etersoft www.etersoft.ru
# 2003-2006
, 2009
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -18,24 +18,31 @@ if [ "$1" = "-i" ]; then
shift
fi
TOFILE
=
`
which
$1
2>/dev/null
`
if
[
-z
"
$TOFILE
"
]
;
then
#echo "$1 is missed in PATH"
#exit 1
TOFILE
=
$1
fi
if
[
-L
"
$TOFILE
"
]
;
then
LINKTO
=
`
readlink
"
$TOFILE
"
`
if
[
-L
"
$LINKTO
"
]
;
then
LINKTO1
=
`
readlink
"
$LINKTO
"
`
echo
"Note:
$TOFILE
is link to
$LINKTO
, that is link to
$LINKTO1
"
TOFILE
=
"
$LINKTO1
"
# 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
"
TOFILE
=
"
$LINKTO
"
real_file
"
$LINKTO
"
fi
fi
FULLFILEPATH
=
`
readlink
-f
$TOFILE
`
}
real_file
"
$1
"
rpm
-qf
$ARG
"
$
TOFILE
"
rpm
-qf
$ARG
"
$
FULLFILEPATH
"
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