projects
/
hvlinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2393f0
)
Remove old build directory
author
Hugo Villeneuve
<hugo@hugovil.com>
Mon, 2 Mar 2015 02:12:02 +0000
(21:12 -0500)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Tue, 3 Mar 2015 02:07:36 +0000
(21:07 -0500)
functions/ipkg
patch
|
blob
|
history
diff --git
a/functions/ipkg
b/functions/ipkg
index
ca159bd
..
61ba492
100644
(file)
--- a/
functions/ipkg
+++ b/
functions/ipkg
@@
-24,13
+24,24
@@
unset -f hvconfig_cache
unset -f hvconfig_post
unset -f hvbuild_post
unset -f hvconfig_post
unset -f hvbuild_post
-ipkg_decompress_package()
+# Arg #1: Clean label for debug message (optional)
+function dir_cleanup()
{
# Removing old build directory (if any)
if [ -d ${LFS_TMP}/${PACKAGE} ]; then
{
# Removing old build directory (if any)
if [ -d ${LFS_TMP}/${PACKAGE} ]; then
- echo "Removing
old build
directory"
+ echo "Removing
${1} source
directory"
rm -rf ${LFS_TMP}/${PACKAGE}
fi
rm -rf ${LFS_TMP}/${PACKAGE}
fi
+ if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then
+ echo "Removing ${1} build directory"
+ rm -rf ${LFS_TMP}/${PACKAGE}-build
+ fi
+}
+
+ipkg_decompress_package()
+{
+ # Removing old source and build directories (if any)
+ dir_cleanup "old"
echo "Decompressing package"
decompress_package ${PACKAGE}
echo "Decompressing package"
decompress_package ${PACKAGE}
@@
-112,15
+123,7
@@
ipkg_finish()
# Some scripts need to preserve the source or build directory. They can
# do so by renaming them.
# Some scripts need to preserve the source or build directory. They can
# do so by renaming them.
- if [ -d ${LFS_TMP}/${PACKAGE} ]; then
- # Removing source directory
- echo "Removing source directory"
- rm -rf ${LFS_TMP}/${PACKAGE}
- fi
- if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then
- echo "Removing build directory"
- rm -rf ${LFS_TMP}/${PACKAGE}-build
- fi
+ dir_cleanup
else
BUILD_SIZE="Unknown"
fi
else
BUILD_SIZE="Unknown"
fi