Can someone convert a short DOS script to shell script?

Here's the script. I'd like it to be Linux compatible as it is currently made for a Windows computer. Java is installed on the Linux machine.

http://tinypaste.com/3e957

?2010-07-23T15:12:49Z

Favorite Answer

I am not familiar with the CD command you've used, but with a little tinkering, this might do:

#!/bin/bash

# Use cd to switch to the desired directory

# Set variables

JAVAPATH='/path/to/your/java/executable'

cd <your directory here>

rm -rf compressed/*
rm -rf mini/*

for f in *
do
$JAVAPATH -jar html.jar $f -o resources/mini/$f && gzip -c -9 resources/mini/$f >> resources/compressed/$f.jgz