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
6f6ffd53
Commit
6f6ffd53
authored
May 13, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: introduce --debug and use it to enable bash -x
parent
ddc0a086
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
5 deletions
+24
-5
epm
bin/epm
+4
-0
epm-pack
bin/epm-pack
+1
-1
epm-play
bin/epm-play
+1
-1
epm-repack-rpm
bin/epm-repack-rpm
+1
-1
epm-sh-functions
bin/epm-sh-functions
+17
-2
No files found.
bin/epm
View file @
6f6ffd53
...
...
@@ -95,6 +95,7 @@ print_version()
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Descr
=
"epm - EPM package manager"
debug
=
verbose
=
$EPM_VERBOSE
quiet
=
nodeps
=
...
...
@@ -473,6 +474,9 @@ check_option()
--verbose
)
# HELPOPT: verbose mode
verbose
=
"--verbose"
;;
--debug
)
# HELPOPT: more debug output mode
debug
=
"--debug"
;;
--skip-installed
)
# HELPOPT: skip already installed packages during install
skip_installed
=
1
;;
...
...
bin/epm-pack
View file @
6f6ffd53
...
...
@@ -41,7 +41,7 @@ __epm_pack()
[
"
$PROGDIR
"
=
"/usr/bin"
]
&&
SCPATH
=
"
$PATH
"
||
SCPATH
=
"
$PROGDIR
:
$PATH
"
local
bashopt
=
''
[
-n
"
$
verbose
"
]
&&
bashopt
=
'-x'
[
-n
"
$
debug
"
]
&&
bashopt
=
'-x'
#info "Running $($script --description 2>/dev/null) ..."
(
unset
EPMCURDIR
;
export
PATH
=
$SCPATH
;
docmd
$CMDSHELL
$bashopt
$repackcode
"
$tarname
"
"
$filefortarname
"
"
$packversion
"
)
||
fatal
returntarname
=
"
$(
cat
"
$filefortarname
"
)
"
||
fatal
"pack script
$repackcode
didn't set tarname"
...
...
bin/epm-play
View file @
6f6ffd53
...
...
@@ -152,7 +152,7 @@ __epm_play_run()
addopt
=
"
$dryrun
$non_interactive
"
local
bashopt
=
''
[
-n
"
$
verbose
"
]
&&
bashopt
=
'-x'
[
-n
"
$
debug
"
]
&&
bashopt
=
'-x'
#info "Running $($script --description 2>/dev/null) ..."
[
"
$PROGDIR
"
=
"/usr/bin"
]
&&
SCPATH
=
"
$PATH
"
||
SCPATH
=
"
$PROGDIR
:
$PATH
"
(
export
EPM_OPTIONS
=
"
$EPM_OPTIONS
$addopt
"
export
PATH
=
$SCPATH
;
docmd
$CMDSHELL
$bashopt
$script
"
$@
"
)
...
...
bin/epm-repack-rpm
View file @
6f6ffd53
...
...
@@ -84,7 +84,7 @@ __apply_fix_code()
shift
[
"
$PROGDIR
"
=
"/usr/bin"
]
&&
SCPATH
=
"
$PATH
"
||
SCPATH
=
"
$PROGDIR
:
$PATH
"
local
bashopt
=
''
[
-n
"
$
verbose
"
]
&&
bashopt
=
'-x'
[
-n
"
$
debug
"
]
&&
bashopt
=
'-x'
(
unset
EPMCURDIR
;
export
PATH
=
$SCPATH
;
docmd
$CMDSHELL
$bashopt
$repackcode
"
$1
"
"
$2
"
"
$3
"
"
$4
"
)
||
fatal
"There is an error from
$repackcode
script"
}
...
...
bin/epm-sh-functions
View file @
6f6ffd53
...
...
@@ -286,7 +286,7 @@ epm()
# run epm again to full initialization
local
bashopt
=
''
[
-n
"
$
verbose
"
]
&&
bashopt
=
'-x'
[
-n
"
$
debug
"
]
&&
bashopt
=
'-x'
$CMDSHELL
$bashopt
$PROGDIR
/
$PROGNAME
--inscript
"
$@
"
}
...
...
@@ -297,7 +297,7 @@ sudoepm()
[
"
$EPMMODE
"
=
"pipe"
]
&&
fatal
"Can't use sudo epm call from the piped script"
local
bashopt
=
''
[
-n
"
$
verbose
"
]
&&
bashopt
=
'-x'
[
-n
"
$
debug
"
]
&&
bashopt
=
'-x'
sudorun
$CMDSHELL
$bashopt
$PROGDIR
/
$PROGNAME
--inscript
"
$@
"
}
...
...
@@ -317,6 +317,21 @@ fatal()
exit
1
}
# Print debug message
debug
()
{
[
-n
"
$debug
"
]
||
return
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
set_color
$YELLOW
>
&2
echo
-n
"WARNING: "
>
&2
restore_color
>
&2
echo
"
$*
"
>
&2
# else
# echog "Error in $0: $@" >&2
fi
}
# Print warning message
warning
()
{
...
...
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