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
072158d8
Commit
072158d8
authored
Feb 27, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite assure_exists with internal __epm_assure
parent
7b2a0ea3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
epm-sh-functions
bin/epm-sh-functions
+13
-20
No files found.
bin/epm-sh-functions
View file @
072158d8
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012
, 2014
Etersoft
# Copyright (C) 2012
, 2014
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -267,32 +267,25 @@ set_eatmydata()
return
0
}
assure_exists
()
#
__get_package_for_command
()
{
PATH
=
$PATH
:/sbin:/usr/sbin which
$1
2>/dev/null
>
/dev/null
&&
return
echo
"Install appropriate package for
$1
command..."
case
$1
in
case
"
$1
"
in
equery|revdep-rebuild
)
epm
install
gentoolkit
;;
apt-repo
)
epm
install
apt-repo
;;
apt-file
)
epm
install
apt-file
;;
erc
)
epm
install
erc
echo
'gentoolkit'
;;
update-kernel|remove-old-kernels
)
epm
install
update-kernel
;;
*
)
fatal
"Internal error: Unknown binary
$1
to check if exists"
echo
'update-kernel'
;;
esac
}
assure_exists
()
{
load_helper epm-assure
__epm_assure
"
$1
"
$(
__get_package_for_command
"
$1
"
)
}
# improve
get_package_type
()
{
...
...
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