Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, 31 May 2011 17:05:55 -0400, "Eric Furman" wrote: > On Tue, 31 May 2011 13:43 +0200, "Marian Hettwer" >> Obviously not. >> I'm talking about shell scripts which should work in a multi unix >> environment. Namely, in my env, Debian, Solaris and OpenBSD. >> I tend to install gnu sed and gnu grep and gnu diff on all 3 named >> systems. >> I actually see nothing bad about it. Not at all. > > And what do you do when you are not in charge of the box you > need your script to run on? It is not uncommon to work in an > environment with many thousands of boxes most of which you > have no control over. You cannot depend on gnu or any other > tools being installed on them. Better to have your script > detect which OS it's running on and take appropriate action. > You are establishing a very bad habit... I can only partly agree. In my case, I am in charge of them boxes. And we are talking a thousand and a bit. However, if I'm not in charge of the box, I do make sure that my script will run with the native tools of whatever unix (well, Linux, FreeBSD, OpenBSD, Solaris) it should run on. I do disagree with regards to a bad habit. It isn't. It's pragmatic. That's what you do if you are in charge of the boxes. And yep, this is really OT now. Cheers, Marian
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, May 31, 2011 at 04:11:16PM -0700, patrick keshishian wrote: > fucking amateurs. if you ran windows you wouldn't have this problem. Last time I did ran into a window, it did hurt, quite a bit. The window did broke, but I left around a lot of blood and it was messy. Somewhat. Why the obsession for running into windows. I tried, and it was not fun. Hell. I could have more fun sitting on the mud in front of a buldozer. Please excuse me. I have one of those in front of my house, and I need to lie down there for quite some time. -- Gilbert Fernandes
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, May 31, 2011 at 3:29 PM, wrote: > On Tue, May 31, 2011 at 11:05:18PM +, Kevin Chadwick wrote: > >> if there is such a writable place! > > Yes. When I tried to make such a script, that > contained a static binary, finding such a place > was almost a nightmare. In the end, the admin > of the foreign server took pity of me and installed > locally the binary I required :p fucking amateurs. if you ran windows you wouldn't have this problem. --patrick
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, May 31, 2011 at 11:05:18PM +, Kevin Chadwick wrote: > if there is such a writable place! Yes. When I tried to make such a script, that contained a static binary, finding such a place was almost a nightmare. In the end, the admin of the foreign server took pity of me and installed locally the binary I required :p -- Gilbert Fernandes
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, 31 May 2011 23:33:22 +0200 gilbert.fernan...@orange.fr wrote: > (make sure where it is somewhere it can run) if there is such a writable place!
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, May 31, 2011 at 05:05:55PM -0400, Eric Furman wrote: > And what do you do when you are not in charge of the box you > need your script to run on? You write a script that uses a statically compiled binary, the one you need. There is a tool to create a .sh script that will contain the binary and your script. If I remember correctly, that's how Star Office installed itself : the .sh extracted what was required and runned. The tool to create such .sh scripts that contains binaries can then be used. Your script will extract locally the binary (make sure where it is somewhere it can run) and then run, using the statically compiled binary. Not pretty but the binary can be updated with the script and your script will be a little fat in size :-) -- Gilbert Fernandes
Re: OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, May 31, 2011 at 4:05 PM, Eric Furman wrote: > Better to have your script > detect which OS it's running on and take appropriate action. > > Sure, that's why autoconf is state of art.
OT:Re: How do I exclude a directory using tar in OpenBSD?
On Tue, 31 May 2011 13:43 +0200, "Marian Hettwer" wrote: > On Tue, 31 May 2011 11:39:41 +0200, Jeremie Courreges-Anglas > wrote: > > Le 31/05/2011 11:23, Marian Hettwer a C)crit : > >>> That is a GNU extension. You can work this around with find(1) and the > >>> tar(1)'s '-I' option. > > > > Also > > tar cf /foo.tar /bar/!(folder|other_folder) > > using plain ksh > > > that looks nice. > > >> bsdtar from the FreeBSD project supports --exclude too. > >> The OP could as well install gnu tar from packages. bsdtar doens't seem > >> to exist... > >> > >> At least that's what I do at work (Debian, Solaris, OpenBSD env). > >> It's a pain to walk around every nifty details of different unixes... > > > > I'm wondering where does that logic stop... do you also install GNU ls > > to get colors? > > Obviously not. > I'm talking about shell scripts which should work in a multi unix > environment. Namely, in my env, Debian, Solaris and OpenBSD. > I tend to install gnu sed and gnu grep and gnu diff on all 3 named > systems. > I actually see nothing bad about it. Not at all. And what do you do when you are not in charge of the box you need your script to run on? It is not uncommon to work in an environment with many thousands of boxes most of which you have no control over. You cannot depend on gnu or any other tools being installed on them. Better to have your script detect which OS it's running on and take appropriate action. You are establishing a very bad habit...