On Mon, Sep 24, 2012 at 12:44:32AM +1000, Allan McRae wrote:
> Unify split and single packages to always use a folder within pkg/
> as thier $pkgdir.  This will allow a folder for storing a package with
> stripped debug symbols to be added within pkg/ too.
> 
> Signed-off-by: Allan McRae <[email protected]>
> ---
>  scripts/makepkg.sh.in | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 5283d73..c857060 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -2678,6 +2678,9 @@ if (( INFAKEROOT )); then
>       fi
>  
>       if (( ! SPLITPKG )); then
> +             pkgdir="$pkgdir/$pkgname"
> +             mkdir -p "$pkgdir"
> +             chmod a-s "$pkgdir"

Can't we just use mkdir's -m flag here? It's specified by POSIX.

>               if (( ! PKGFUNC )); then
>                       if (( ! REPKG )); then
>                               if (( BUILDFUNC )); then
> @@ -2693,6 +2696,7 @@ if (( INFAKEROOT )); then
>               fi
>               tidy_install
>               create_package
> +             pkgdir="${pkgdir%/*}"
>       else
>               run_split_packaging
>       fi
> @@ -2819,6 +2823,9 @@ else
>                       (( CHECKFUNC )) && run_check
>               fi
>               if (( ! SPLITPKG )); then
> +                     pkgdir="$pkgdir/$pkgname"
> +                     mkdir -p "$pkgdir"
> +                     chmod a-s "$pkgdir"

And here...

>                       if (( PKGFUNC )); then
>                               run_package
>                       elif (( REPKG )); then
> @@ -2827,6 +2834,7 @@ else
>                       fi
>                       tidy_install
>                       create_package
> +                     pkgdir="${pkgdir%/*}"
>               else
>                       run_split_packaging
>               fi
> -- 
> 1.7.12.1
> 
> 

Reply via email to