7 echo "Usage: `basename $0` [imagefile.ext] [-o|-i]"
8 echo "-o will make the bottom of the image be on the outside of the disk"
9 echo "-i will make the bottom of the image be on the inside of the disk"
11 echo "Image must be greyscale"
13 echo "make sure the imagefile has the right x-y format"
14 echo "run cdrecord driveropts=tattooinfo -checkdrive"
28 echo "error: arg2 must be -o or -i"
33 echo "Make sure the imagefile has the right size"
34 echo "run cdrecord dev=a,b,c driveropts=tattooinfo -checkdrive"
37 echo -n "Converting $1 to disktattoo_image format: "
39 ## convert it tp ppm format
40 ## note.. -flop = flip horizontally
41 convert $convopts "$1" "$1-TMP-$$.ppm"
43 ## We only need the data, which is the last line in a ppm file
44 ## tail works mighty fine for this (insert evil dirty-coder-laughter here)
45 tail -n+4 "$1-TMP-$$.ppm" > "$1.disktattoo_image"
47 ## clean up like a good boy
50 ## notify user that we're done converting
54 ## stop with stupid code commenting
55 echo "You may now burn '$1.disktattoo_image' to your cd with the command:"
56 echo "cdrecord driveropts=tattoofile=\"$1.disktattoo_image\" -checkdrive"