On Sat, 27 Feb 2016 20:53:48 -0300
Marc Collin <marc.coll...@gmail.com> wrote:

> I did a one-liner that finds every file named "arg.h", extract their
> last modified date, get the "arg.h" that was last modified, and
> replace all "arg.h" with this latest version (arg.h from the project
> that last updated it). This one-line can be run by who has access to
> all repositories on git.suckless.org. Just run it on the root
> directory and all projects will receive the latest "arg.h". The bad
> side of this? It's manual. Every time any "arg.h" is updated, you'll
> have to run the one-liner. Maybe someone has a better idea? Why is no
> project currently using libsl? Is it because it comes with other stuff
> besides arg.h and that's usually useless for many projects?
> 
> Anyway here's the one-liner I described above.
> 
> find ./ -name "arg.h" -exec cp `find ./ -name "arg.h" | xargs stat |
> grep -e File -e Modify | cut -c 9-27 | tr '\n' ' ' | sed
> 's/\.\//\n.\//g' | sed '1d' | awk '{ print $2 " " $3 " " $1}' | sort |
> tail -n 1 | cut -c 21-` {} \;
> 
> 
> 
> On Sat, Feb 27, 2016 at 7:20 PM, Charlie Kester
> <corky1...@comcast.net> wrote:
> > On Sat 27 Feb 2016 at 12:14:47 PST Marc Collin wrote:  
> >>
> >> So the idea is to send patches to all arg.h files on different
> >> suckless projects when one of them is modified?
> >> Wouldn't it be easier to have a more centralized arg.h (and similar
> >> tools)?
> >> I'm not complaining, I just want to understand the idea you guys
> >> have. I noticed there's libsl on git.suckless.org that attempts to
> >> unite suckless files many suckless projects use at the same place
> >> but it seems this didn't take off.
> >>
> >> On Sat, Feb 27, 2016 at 5:01 PM, Dimitris Papastamos
> >> <s...@2f30.org> wrote:  
> >>>
> >>> On Sat, Feb 27, 2016 at 03:56:25PM -0300, Marc Collin wrote:  
> >>>>
> >>>> Hello,
> >>>> A few days ago arg.h was update on sbase to fix an out-of bounds
> >>>> error. After that the same error was fixed (some sooner some
> >>>> later) on lots of other projects that also have arg.h like
> >>>> ubase, slock, dmenu, st, and others. And many tools that use
> >>>> arg.h are still not fixed. Isn't this bad for maintenance?
> >>>> Couldn't projects import arg.h and similar tools from another
> >>>> repository and then only 1 place have to be fixed to everyone
> >>>> benefit? Or a script that can be run to automatically sync all
> >>>> arg.h on git.suckless.org with the master version? Thanks.  
> >>>
> >>>
> >>> Send patches.
> >>>  
> >
> > Send patches to make those many projects get arg.h from libsl?
> >  
> 

Synchronization of common code between projects is built into git:
https://git-scm.com/docs/git-submodule

Maybe libsl should be submodule of other projects that use it?

Daniel

-- 


Reply via email to