[pacman-dev] [PATCH] Make sure dot files don't get included in package

Xavier shiningxc at gmail.com
Tue Jun 10 17:03:35 EDT 2008


Dan McGee wrote:
> On Sat, May 31, 2008 at 8:18 AM, Sebastian Nowicki<sebnow at gmail.com>  wrote:
>> On 31/05/2008, at 9:09 PM, Dan McGee wrote:
>>
>>> On Sat, May 31, 2008 at 4:19 AM, Sebastian Nowicki
>>> <sebnow at gmail.com>  wrote:
>>>> On BSD systems, as a super user, `ls` displays all dot files by
>>>> default.
>>>> On most BSD systems -I can be used to suppress this behavior, but
>>>> this
>>>> argument is not available on Mac OSX. Instead, grep is used to
>>>> filter out
>>>> all dot files.
>>>>
>>>> Signed-off-by: Sebastian Nowicki<sebnow at gmail.com>
>>>> ---
>>>> scripts/makepkg.sh.in |    2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
>>>> index cb55dea..f4acd50 100644
>>>> --- a/scripts/makepkg.sh.in
>>>> +++ b/scripts/makepkg.sh.in
>>>> @@ -849,7 +849,7 @@ create_package() {
>>>>
>>>>        local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-$
>>>> {CARCH}${PKGEXT}"
>>>>
>>>> -       if ! bsdtar -czf "$pkg_file" $comp_files $(ls); then
>>>> +       if ! bsdtar -czf "$pkg_file" $comp_files $(ls | grep -v '^
>>>> \.'); then
>>>>                error "$(gettext "Failed to create package file.")"
>>>>                exit 1 # TODO: error code
>>>>        fi
>>>> --
>>> The --hide or -I/--ignore options to ls aren't available, are they?
>>> That would be a slightly cleaner solution, but I'm not sure if these
>>> are in the POSIX standard or something.
>>>
>>> -Dan
>> -I is available on BSD, but I can't find any similar option on Mac OSX
>> (it's really starting to be a pain in the ass).
>
> Ahh, I read your commit note as saying the letter L (but lowercase),
> not I, so that is why I was confused. Sounds like Mac OSX is a piece
> of shit. :P
>

what is that $(ls) thing? what is wrong with *?




More information about the pacman-dev mailing list