--- scripts/makepkg.sh.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 6ca678e..af8a606 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2822,6 +2822,11 @@ run_split_packaging() { local pkgname_backup=${pkgname[@]} for pkgname in ${pkgname_backup[@]}; do pkgdir="$pkgdirbase/$pkgname" + # clean existing pkg directory + if [[ -d $pkgdir ]]; then + msg "$(gettext "Removing existing %s directory...")" "\$pkgdir/" + rm -rf "$pkgdir" + fi mkdir "$pkgdir" backup_package_variables run_package $pkgname @@ -3276,6 +3281,11 @@ if (( INFAKEROOT )); then chmod 755 "$pkgdirbase" if (( ! SPLITPKG )); then pkgdir="$pkgdirbase/$pkgname" + # clean existing pkg directory + if [[ -d $pkgdir ]]; then + msg "$(gettext "Removing existing %s directory...")" "\$pkgdir/" + rm -rf "$pkgdir" + fi mkdir "$pkgdir" if (( PKGFUNC )); then run_package @@ -3396,11 +3406,6 @@ else cd_safe "$startdir" fi - # clean existing pkg directory - if [[ -d $pkgdirbase ]]; then - msg "$(gettext "Removing existing %s directory...")" "\$pkgdir/" - rm -rf "$pkgdirbase" - fi mkdir -p "$pkgdirbase" chmod a-srwx "$pkgdirbase" -- 1.9.4.msysgit.2 -- David Macek