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
Nurlan
eepm
Commits
e7966c3a
Commit
e7966c3a
authored
2 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repack: clean created tmp dir
parent
4efe5310
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
epm-repack
bin/epm-repack
+5
-11
No files found.
bin/epm-repack
View file @
e7966c3a
...
@@ -64,6 +64,8 @@ __epm_repack_to_deb()
...
@@ -64,6 +64,8 @@ __epm_repack_to_deb()
repacked_pkgs
=
''
repacked_pkgs
=
''
local
TDIR
=
$(
mktemp
-d
--tmpdir
=
$BIGTMPDIR
)
local
TDIR
=
$(
mktemp
-d
--tmpdir
=
$BIGTMPDIR
)
to_clean_tmp_dirs
=
"
$to_clean_tmp_dirs
$TDIR
"
trap
"__epm_remove_tmp_files"
EXIT
for
pkg
in
$pkgs
;
do
for
pkg
in
$pkgs
;
do
abspkg
=
"
$(
realpath
"
$pkg
"
)
"
abspkg
=
"
$(
realpath
"
$pkg
"
)
"
...
@@ -82,20 +84,10 @@ __epm_repack_to_deb()
...
@@ -82,20 +84,10 @@ __epm_repack_to_deb()
repacked_pkgs
=
"
$repacked_pkgs
$(
realpath
$DEBCONVERTED
)
"
repacked_pkgs
=
"
$repacked_pkgs
$(
realpath
$DEBCONVERTED
)
"
to_remove_pkg_files
=
"
$to_remove_pkg_files
$(
realpath
$DEBCONVERTED
)
"
to_remove_pkg_files
=
"
$to_remove_pkg_files
$(
realpath
$DEBCONVERTED
)
"
fi
fi
to_remove_pkg_dirs
=
"
$to_remove_pkg_files
$TDIR
"
clean_store_output
clean_store_output
cd
-
>
/dev/null
cd
-
>
/dev/null
done
done
# TODO: move it to exit handler
#if [ -z "$DEBUG" ] ; then
# # TODO: reinvent
# [ -n "$to_remove_pkg_files" ] && rm -f $to_remove_pkg_files
# [ -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
#fi
#cd - >/dev/null
return
0
return
0
}
}
...
@@ -308,6 +300,8 @@ __epm_repack_to_rpm()
...
@@ -308,6 +300,8 @@ __epm_repack_to_rpm()
local
pkg
local
pkg
export
HOME
=
$(
mktemp
-d
--tmpdir
=
$BIGTMPDIR
)
export
HOME
=
$(
mktemp
-d
--tmpdir
=
$BIGTMPDIR
)
to_clean_tmp_dirs
=
"
$to_clean_tmp_dirs
$HOME
"
trap
"__epm_remove_tmp_files"
EXIT
__create_rpmmacros
__create_rpmmacros
local
alpkg
local
alpkg
...
@@ -376,7 +370,6 @@ __epm_repack_to_rpm()
...
@@ -376,7 +370,6 @@ __epm_repack_to_rpm()
rm
-rf
$spec
rm
-rf
$spec
done
done
to_remove_pkg_dirs
=
"
$to_remove_pkg_dirs
$HOME
"
rmdir
$tmpbuilddir
rmdir
$tmpbuilddir
#rmdir $tmpbuilddir/..
#rmdir $tmpbuilddir/..
true
true
...
@@ -392,6 +385,7 @@ __epm_remove_tmp_files()
...
@@ -392,6 +385,7 @@ __epm_remove_tmp_files()
# hack??
# hack??
[
-n
"
$to_remove_pkg_files
"
]
&&
rmdir
$(
dirname
$to_remove_pkg_files
|
head
-n1
)
2>/dev/null
[
-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_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
fi
return
0
return
0
}
}
...
...
This diff is collapsed.
Click to expand it.
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