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
2bc03dfa
Commit
2bc03dfa
authored
Aug 22, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmurl: fix handle -t, small optimize
parent
68818a5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
rpmurl
bin/rpmurl
+5
-7
No files found.
bin/rpmurl
View file @
2bc03dfa
...
...
@@ -36,14 +36,14 @@ phelp()
echog
" -f print failed URL only"
}
while
getopts
:hcfsp opt
;
do
while
getopts
:hcfs
t
p opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
c
)
CHECKONLY
=
1
;;
f
)
FAILEDONLY
=
1
;
CHECKONLY
=
1
;;
s
)
ABOUTDIR
=
1
;;
t
)
PRINTONLY
=
1
;;
p
)
SISYPHUSRU
=
1
;;
f
)
FAILEDONLY
=
1
;
CHECKONLY
=
1
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
...
...
@@ -68,22 +68,20 @@ check_spec()
local
SPEC
=
"
$1
"
rhas
"
$SPEC
"
"
\.
spec$"
||
fatal
"Use only for git repo or with spec"
PKGNAME
=
$(
eval_spec
$SPEC
| get_var
"Name"
)
RPM_URL
=
$(
eval_spec
$SPEC
| get_var
"Url"
)
SOURCE
=
$(
eval_spec
$SPEC
| get_var
"Source"
)
if
[
-n
"
$SISYPHUSRU
"
]
;
then
PKGNAME
=
$(
eval_spec
$SPEC
| get_var
"Name"
)
RPM_URL
=
$PAGEURL
/
$PKGNAME
if
[
-n
"
$ABOUTDIR
"
]
;
then
RPM_URL
=
$RPM_URL
/get
fi
else
RPM_URL
=
$(
eval_spec
$SPEC
| get_var
"Url"
)
if
[
-n
"
$ABOUTDIR
"
]
;
then
SOURCE
=
$(
eval_spec
$SPEC
| get_var
"Source"
)
RPM_URL
=
$(
dirname
$SOURCE
)
fi
[
"
$RPM_URL
"
=
"(none)"
]
&&
RPM_URL
=
""
[
-z
"
${
RPM_URL
}
"
]
&&
fatal
"Cannot get package URL"
fi
...
...
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