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
7aba847f
Commit
7aba847f
authored
Jul 19, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: add SUDO support, add load_helper func
parent
f121dc6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
epm
bin/epm
+21
-10
No files found.
bin/epm
View file @
7aba847f
...
...
@@ -24,7 +24,23 @@
#. /usr/share/eterbuild/eterbuild
#load_mod rpm git buildsrpm
.
$(
dirname
$0
)
/epm-sh-functions
PROGDIR
=
$(
dirname
$0
)
load_helper
()
{
[
-r
"
$PROGDIR
/
$1
"
]
||
fatal
"Have no
$PROGDIR
/
$1
helper file"
.
$PROGDIR
/
$1
}
load_helper epm-sh-functions
# set SUDO not for root user
SUDO
=
"sudo"
[
-n
"
$UID
"
]
||
UID
=
`
id
-u
`
if
[
$UID
=
"0"
]
;
then
SUDO
=
""
fi
#############################
...
...
@@ -41,7 +57,7 @@ name=${0##*/}
Usage
=
"Usage:
$name
[-i|install] [package name(s), package files]..."
Descr
=
"
$name
- etersoft package manager"
verbose
=
1
verbose
=
epm_cmd
=
pkg_files
=
pkg_names
=
...
...
@@ -120,14 +136,9 @@ DISTRVENDOR=$PROGDIR/distr_info
[
-n
"
$DISTRNAME
"
]
||
DISTRNAME
=
$(
$DISTRVENDOR
-d
)
[
-n
"
$DISTRVERSION
"
]
||
DISTRVERSION
=
$(
$DISTRVENDOR
-v
)
set_target_pkg_env
set_pm_type
[
-n
"
$epm_cmd
"
]
||
fatal
"Run without command"
epm_cmd_file
=
$(
dirname
$0
)
/epm-
$epm_cmd
[
-r
"
$epm_cmd_file
"
]
||
fatal
"Have no
$epm_cmd_file
command file"
.
$epm_cmd_file
# Run helper for command
[
-n
"
$epm_cmd
"
]
||
fatal
"Run without any command"
load_helper epm-
$epm_cmd
epm_
$epm_cmd
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