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
cd36d7f7
Commit
cd36d7f7
authored
Oct 23, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm addrepo: refactoring
parent
de2a9942
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
44 deletions
+53
-44
epm-addrepo
bin/epm-addrepo
+53
-44
No files found.
bin/epm-addrepo
View file @
cd36d7f7
...
...
@@ -19,62 +19,71 @@
load_helper epm-sh-altlinux
epm_addrepo
()
__epm_addrepo_altlinux
()
{
local
repo
=
"
$(
eval echo
"
$quoted_args
"
)
"
local
repo
=
"
$@
"
case
"
$1
"
in
etersoft
)
info
"add Etersoft's addon repo"
load_helper epm-query
epm
install
--skip-installed
apt-conf-etersoft-common apt-conf-etersoft-hold
# TODO: ignore only error code 22 (skipped) || fatal
local
branch
=
"
$DISTRVERSION
/branch"
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
&&
branch
=
"
$DISTRVERSION
"
# FIXME
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
local arch
=
$(
uname
-m
)
[
"
$arch
"
=
"i686"
]
&&
arch
=
"i586"
# TODO: use apt-repo add ?
echo
""
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"# added with eepm addrepo etersoft"
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/
$arch
addon"
| sudocmd
tee
-a
/etc/apt/sources.list
if
[
"
$arch
"
=
"x86_64"
]
;
then
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/
$arch
-i586 addon"
| sudocmd
tee
-a
/etc/apt/sources.list
fi
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/noarch addon"
| sudocmd
tee
-a
/etc/apt/sources.list
repo
=
"
$DISTRVERSION
"
return
0
;;
autoimports
)
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"[:upper:]"
"[:lower:]"
)
"
;;
archive
)
;;
esac
case
$DISTRNAME
in
ALTLinux
)
case
"
$repo
"
in
etersoft
)
info
"add Etersoft's addon repo"
load_helper epm-query
epm
install
--skip-installed
apt-conf-etersoft-common apt-conf-etersoft-hold
||
fatal
local
branch
=
"
$DISTRVERSION
/branch"
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
&&
branch
=
"
$DISTRVERSION
"
# FIXME
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
local arch
=
$(
uname
-m
)
[
"
$arch
"
=
"i686"
]
&&
arch
=
"i586"
# TODO: use apt-repo add ?
echo
""
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"# added with eepm addrepo etersoft"
| sudocmd
tee
-a
/etc/apt/sources.list
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/
$arch
addon"
| sudocmd
tee
-a
/etc/apt/sources.list
if
[
"
$arch
"
=
"x86_64"
]
;
then
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/
$arch
-i586 addon"
| sudocmd
tee
-a
/etc/apt/sources.list
fi
echo
"rpm [etersoft] http://download.etersoft.ru/pub/Etersoft LINUX@Etersoft/
$branch
/noarch addon"
| sudocmd
tee
-a
/etc/apt/sources.list
repo
=
"
$DISTRVERSION
"
return
0
;;
autoimports
)
[
-n
"
$DISTRVERSION
"
]
||
fatal
"Empty DISTRVERSION"
repo
=
"
$repo
.
$(
echo
"
$DISTRVERSION
"
|
tr
"[:upper:]"
"[:lower:]"
)
"
esac
assure_exists apt-repo
assure_exists apt-repo
if
tasknumber
"
$repo
"
>
/dev/null
;
then
sudocmd apt-repo add
$(
tasknumber
"
$repo
"
)
return
fi
if
tasknumber
"
$repo
"
>
/dev/null
;
then
sudocmd apt-repo add
$(
tasknumber
"
$repo
"
)
return
fi
if
[
-z
"
$repo
"
]
;
then
info
"Add branch repo. TODO?"
sudodocmd apt-repo add branch
return
fi
if
[
-z
"
$repo
"
]
;
then
info
"Add branch repo. TODO?"
sudodocmd apt-repo add branch
return
fi
sudocmd apt-repo add
"
$repo
"
sudocmd apt-repo add
"
$repo
"
}
epm_addrepo
()
{
local
repo
=
"
$(
eval echo
"
$quoted_args
"
)
"
case
$DISTRNAME
in
ALTLinux
)
__epm_addrepo_altlinux
$repo
return
;;
esac
case
$PMTYPE
in
apt-dpkg|aptitude-dpkg
)
info
"You need manually add repo to /etc/apt/sources.list"
info
"You need manually add repo to /etc/apt/sources.list
(TODO)
"
;;
yum-rpm
)
assure_exists yum-utils
...
...
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