1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 18:06:13 +01:00

Check for existance of .oscrc before collecting alias

Signed-off-by: Olaf Hering <olaf@aepfle.de>
This commit is contained in:
Olaf Hering 2016-07-28 12:32:58 +02:00
parent 83c1064cfe
commit 9aee047a25

2
dist/osc.complete vendored
View File

@ -91,7 +91,7 @@ if test -s ${PWD}/.osc/_files ; then
lnkprj=$(command sed -rn '/<linkinfo/{s@.*[[:blank:]]project="([^"]+)".*@\1@p;}' < ${PWD}/.osc/_files)
lnkpkg=$(command sed -rn '/<linkinfo/{s@.*[[:blank:]]package="([^"]+)".*@\1@p;}' < ${PWD}/.osc/_files)
fi
if test -s ${PWD}/.osc/_apiurl ; then
if test -s ${PWD}/.osc/_apiurl -a -s ~/.oscrc ; then
read apiurl < ${PWD}/.osc/_apiurl
alias=$(sed -rn '\@^\['${apiurl}'@,\@=@{\@^aliases=@{s@[^=]+=([^,]+),.*@\1@p};}' < ~/.oscrc 2> /dev/null)
fi