--- scripts/makepkg.sh.in | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 9843efe..6ca678e 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -3388,13 +3388,6 @@ if (( NOBUILD )); then msg "$(gettext "Sources are ready.")" exit 0 #E_OK else - # 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" cd_safe "$startdir" if (( ! REPKG )); then @@ -3403,6 +3396,14 @@ 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" + enter_fakeroot fi -- 1.9.4.msysgit.2 -- David Macek