[PATCH] allow empty files creation with install

joris dedieu joris.dedieu at gmail.com
Sat Jul 17 23:59:56 UTC 2010


2010/7/17 Garrett Cooper <gcooper at freebsd.org>:
> On Sat, Jul 17, 2010 at 6:34 AM, joris dedieu <joris.dedieu at gmail.com> wrote:
>> This patch add a -t switch to install(3). This is a small feature for
>> lazy sysadmins.
>>
>> before :
>>
>> touch /usr/home/foo/.history /usr/home/foo/.bash_history
>> chown foo /usr/home/foo/.history /usr/home/foo/.bash_history
>> chmod 600 /usr/home/foo/.history /usr/home/foo/.bash_history
>> chflags sappend /usr/home/foo/.history /usr/home/foo/.bash_history
>>
>> after :
>>
>> install -o foo -g foo -m 600 -f sappend /usr/home/foo/.history
>> /usr/home/foo/.bash_history
>
>    And why isn't creating a 4-command bourne shell script which does
There are a lot of one shot things that don't need a script.
> all of these operations an option? install is used a lot in the build
> process both on the FreeBSD side and the ports side, so I'd prefer if
> it was as minimalist as possible.
Well, install is also powerful cp, mkdir, useful on everyday
administration so I thought it should also be a powerful touch. And
why not more than that ? a powerful file management tool.

I understand that build process is critical and with FreeBSD it's
"just work". In this perspective this patch is maybe not a necessity.

It was fun to do it :)

Joris
> Thanks,
> -Garrett
>


More information about the freebsd-hackers mailing list