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
6022a8f6
Commit
6022a8f6
authored
Mar 27, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repo add: add support for various url forms
parent
139951e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
epm-addrepo
bin/epm-addrepo
+44
-0
No files found.
bin/epm-addrepo
View file @
6022a8f6
...
@@ -96,6 +96,45 @@ __epm_addrepo_altlinux_dir()
...
@@ -96,6 +96,45 @@ __epm_addrepo_altlinux_dir()
done
done
}
}
__epm_addrepo_altlinux_url
()
{
local
url
=
"
$1
"
local arch
local
base
# URL to path/RPMS.addon
base
=
"
$(
basename
"
$url
"
)
"
if
echo
"
$base
"
|
grep
-q
"^RPMS
\.
"
;
then
REPO_NAME
=
"
$(
echo
$base
|
sed
-e
's|.*\.||'
)
"
arch
=
"
$(
basename
$(
dirname
$url
))
"
url
=
"
$(
dirname
$(
dirname
$url
))
"
docmd epm repo add
"rpm
$url
$arch
$REPO_NAME
"
return
fi
# URL to path (where RPMS.addon is exists)
local
baseurl
=
"
$(
eget
--list
"
$url
/RPMS.*"
)
"
base
=
"
$(
basename
"
$baseurl
"
)
"
if
echo
"
$base
"
|
grep
-q
"^RPMS
\.
"
;
then
REPO_NAME
=
"
$(
echo
$base
|
sed
-e
's|.*\.||'
)
"
arch
=
"
$(
basename
$url
)
"
url
=
"
$(
dirname
$url
)
"
docmd epm repo add
"rpm
$url
$arch
$REPO_NAME
"
return
fi
# URL to {i586,x86_64,noarch}/RPMS.addon
local
res
=
''
for
arch
in
$(
get_archlist
)
;
do
local
rd
=
"
$(
eget
--list
$url
/
$arch
/RPMS.
*)
"
[
-d
"
$rd
"
]
||
continue
local
REPO_NAME
=
"
$(
echo
"
$rd
"
|
sed
-e
's|.*\.||'
)
"
docmd epm repo add
"rpm
$url
$arch
$REPO_NAME
"
res
=
'1'
done
[
-n
"
$res
"
]
||
warning
"There is no arch repos in
$url
"
}
__epm_addrepo_altlinux
()
__epm_addrepo_altlinux
()
{
{
...
@@ -121,6 +160,11 @@ __epm_addrepo_altlinux()
...
@@ -121,6 +160,11 @@ __epm_addrepo_altlinux()
return
return
fi
fi
if
is_url
"
$1
"
;
then
__epm_addrepo_altlinux_url
"
$1
"
return
fi
case
"
$1
"
in
case
"
$1
"
in
etersoft
)
etersoft
)
info
"add Etersoft's addon repo"
info
"add Etersoft's addon repo"
...
...
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