You are not logged in.

#1 2010-01-13 13:35:57

gajo
Member
Registered: 2008-04-01
Posts: 93
Website

batch to bash converter

Me and a friend of mine had a small project for one of the classes at the university, to create a program that translates a batch (Windows script) file to a bash (cross-platform, mostly *nix and cygwin script) file.
Now that it's done, I'm posting a link for anyone that might find some use of it. http://ea.github.com/batch2bash/

It still probably doesn't translate most batch files (send me a message if you find examples that don't work), it's poorly documented, the code is an abomination, and errors aren't verbose enough.

I do still plan to work on it even though the project is over, although I'll probably leave it aside a few weeks until I'm done with the rest of the exams.
If someone finds a use for it I might create a install over the AUR. (It actually doesn't have a make install yet even, but it's just the executable anyway)

Offline

#2 2010-01-14 14:40:02

shpelda
Member
Registered: 2008-08-07
Posts: 59

Re: batch to bash converter

Cool. I could really use this when it matures. Do you somehow support one batch calling another one ?
I did not get to testing the stuff yet.

Offline

#3 2010-01-14 15:05:39

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: batch to bash converter

./batch2bash -i Encode.bat -o Encode.sh

error: (2): syntax error, unexpected ID, expecting $end

http://dpaste.com/145095/

Offline

#4 2010-01-14 17:04:29

gajo
Member
Registered: 2008-04-01
Posts: 93
Website

Re: batch to bash converter

shpelda wrote:

Cool. I could really use this when it matures. Do you somehow support one batch calling another one ?
I did not get to testing the stuff yet.

yeah, it probably works already, but you'd need to translate each of those files first, it doesn't do recursive translation tongue

./batch2bash -i Encode.bat -o Encode.sh

error: (2): syntax error, unexpected ID, expecting $end

http://dpaste.com/145095/

i see, i can create a fast fix for that, but i think i should just go ahead and rework some of the basic problems first, we made quite a mess regarding filenames/paths and similar, will post here when that thing of yours works

Offline

Board footer

Powered by FluxBB