You are not logged in.

#1 2011-05-02 04:43:57

manOwl
Member
Registered: 2011-05-01
Posts: 6

Wrote a script to make dealing with pacnew files less tedious!

oops

Last edited by manOwl (2011-05-12 10:12:52)

Offline

#2 2011-05-02 04:57:24

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: Wrote a script to make dealing with pacnew files less tedious!

Intriguing. I see a few things in there that could be tidied up, I'll do it now and send you a pull request.

Also, by convention, we capitalize environment variables (PAGER, EDITOR, ..) and internal shell variables (SHELL, BASH_VERSION, ..). All other variable names should contain at least one lower case letter. Remember that variable names are case-sensitive; this convention avoids accidentally overriding environmental and internal variables.

Last edited by neurolysis (2011-05-02 04:58:46)

Offline

#3 2011-05-02 05:03:57

manOwl
Member
Registered: 2011-05-01
Posts: 6

Re: Wrote a script to make dealing with pacnew files less tedious!

Cool, looking forward to seeing your improvements big_smile

Offline

#4 2011-05-02 05:09:37

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: Wrote a script to make dealing with pacnew files less tedious!

Pull request sent. There are a few more things which could be improved, but I'm off to bed for now. Might send you another to pull later.

Last edited by neurolysis (2011-05-02 05:12:36)

Offline

#5 2011-05-02 11:55:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Wrote a script to make dealing with pacnew files less tedious!

Have you seen pacnews and pacdiff from pacman-contrib?

Last edited by karol (2011-05-02 12:00:05)

Offline

#6 2011-05-02 14:33:35

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Wrote a script to make dealing with pacnew files less tedious!

Moving to Community Contribs


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2011-05-02 15:21:44

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: Wrote a script to make dealing with pacnew files less tedious!

Sounds neat. Since karol has already mentioned pacnews and pacdiff, I'll juts make a quick suggestion about how you make a temporary directory. Why are you using the date? mktemp has the -d switch to make a temporary directory instead of a file, you should try that out. If you still want it to start with etc-, look into mktemp's template structure.

Offline

#8 2011-05-03 06:26:23

manOwl
Member
Registered: 2011-05-01
Posts: 6

Re: Wrote a script to make dealing with pacnew files less tedious!

jac wrote:

Sounds neat. Since karol has already mentioned pacnews and pacdiff, I'll juts make a quick suggestion about how you make a temporary directory. Why are you using the date? mktemp has the -d switch to make a temporary directory instead of a file, you should try that out. If you still want it to start with etc-, look into mktemp's template structure.

Thanks, I'll be looking into making this change later today

Offline

#9 2011-05-04 00:17:58

manOwl
Member
Registered: 2011-05-01
Posts: 6

Re: Wrote a script to make dealing with pacnew files less tedious!

Hey I just updated the script. It includes some contributions from Neurolysis as well as recent fixes.

All you have to do to use it is sudo ~/bin/batch_edit_pacman.sh (assuming you are a vim user)

Offline

Board footer

Powered by FluxBB