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
Vladislav
eepm
Commits
cf12e226
Commit
cf12e226
authored
Mar 23, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move __epm_remove_tmp_files to epm-sh-functions
parent
3cc44a56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
29 deletions
+16
-29
epm-pack
bin/epm-pack
+0
-15
epm-repack
bin/epm-repack
+0
-14
epm-sh-functions
bin/epm-sh-functions
+16
-0
No files found.
bin/epm-pack
View file @
cf12e226
...
...
@@ -23,21 +23,6 @@ load_helper epm-assure
[
-n
"
$EPM_PACK_SCRIPTS_DIR
"
]
||
EPM_PACK_SCRIPTS_DIR
=
"
$CONFIGDIR
/pack.d"
__epm_remove_tmp_files
()
{
# TODO: move it to exit handler
if
[
-z
"
$DEBUG
"
]
;
then
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-f
$to_remove_pkg_files
# hack??
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
[
-n
"
$to_remove_pkg_dirs
"
]
&&
rmdir
$to_remove_pkg_dirs
2>/dev/null
[
-n
"
$to_clean_tmp_dirs
"
]
&&
rm
-rf
$to_clean_tmp_dirs
2>/dev/null
fi
return
0
}
__epm_pack
()
{
local
packname
=
"
$1
"
...
...
bin/epm-repack
View file @
cf12e226
...
...
@@ -399,20 +399,6 @@ __epm_repack_to_rpm()
}
__epm_remove_tmp_files
()
{
# TODO: move it to exit handler
if
[
-z
"
$DEBUG
"
]
;
then
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-f
$to_remove_pkg_files
# hack??
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
[
-n
"
$to_remove_pkg_dirs
"
]
&&
rmdir
$to_remove_pkg_dirs
2>/dev/null
[
-n
"
$to_clean_tmp_dirs
"
]
&&
rm
-rf
$to_clean_tmp_dirs
2>/dev/null
fi
return
0
}
# FIXME: Нужно как-то обеспечить непродолжение выполнения.
# used in epm install
# fill repacked_pkgs
...
...
bin/epm-sh-functions
View file @
cf12e226
...
...
@@ -673,6 +673,22 @@ get_pkg_name_delimiter()
echo
"-"
}
# usage: trap "__epm_remove_tmp_files" EXIT
__epm_remove_tmp_files
()
{
# TODO: move it to exit handler
if
[
-z
"
$DEBUG
"
]
;
then
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-f
$to_remove_pkg_files
# hack??
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
[
-n
"
$to_remove_pkg_dirs
"
]
&&
rmdir
$to_remove_pkg_dirs
2>/dev/null
[
-n
"
$to_clean_tmp_dirs
"
]
&&
rm
-rf
$to_clean_tmp_dirs
2>/dev/null
fi
return
0
}
has_space
()
{
estrlist
--
has_space
"
$@
"
...
...
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