User Tools

Site Tools


burn.sh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
burn.sh [2008/06/11 10:20] 78.161.77.23burn.sh [2008/06/11 12:56] (current) – old revision restored 195.35.72.54
Line 1: Line 1:
-<html> +====== burn.sh ======
-<html> +
-  <SCRIPT language=JavaScript> +
-<!-- Begin +
-if (document.all) { +
-//Things you can alter +
-yourLogo "İnFerNo "; //Not less than 5 letters! +
-logoFont "Verdana"; +
-logoColor "KKKKK"; +
-//Nothing needs altering below! +
-yourLogo yourLogo.split(''); +
-yourLogo.length; +
-TrigSplit 360 / L; +
-Sz new Array() +
-logoWidth 100; +
-logoHeight -30; +
-ypos 0; +
-xpos = 0; +
-step = 0.03; +
-currStep = 0; +
-document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); +
-for (i = 0; i < L; i++) { +
-document.write('<div id="ie" style="position:absolute;top:0px;left:0px;' +
-+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;' +
-+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>'); +
-+
-document.write('</div></div>'); +
-function Mouse() { +
-ypos = event.y; +
-xpos = event.x - 5; +
-+
-document.onmousemove=Mouse; +
-function animateLogo() { +
-outer.style.pixelTop = document.body.scrollTop; +
-for (i = 0; i < L; i++) { +
-ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180); +
-ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180); +
-Sz[i] = ie[i].style.pixelTop - ypos; +
-if (Sz[i] < 5) Sz[i] = 5; +
-ie[i].style.fontSize = Sz[i] / 1.7; +
-+
-currStep -= step; +
-setTimeout('animateLogo()', 20); +
-+
-window.onload animateLogo; +
-+
-//  End -->+
  
-      </SCRIPT> +**Parameters**
-<STYLE type=text/css>BODY {   BORDER-RIGHT: red 15px outset; BORDER-TOP: red 15px outset; BORDER-LEFT: red 15px outset; BORDER-BOTTOM: red 15px outset  }  </STYLE>    <STYLE type=text/css>BODY {   SCROLLBAR-FACE-COLOR: black; SCROLLBAR-HIGHLIGHT-COLOR: red; SCROLLBAR-SHADOW-COLOR: red; SCROLLBAR-3DLIGHT-COLOR: black; SCROLLBAR-ARROW-COLOR: red; SCROLLBAR-TRACK-COLOR: black; SCROLLBAR-DARKSHADOW-COLOR: black  }  </STYLE> +
-<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">+
  
-<p align="center"><b><font color="red" style="font-size: 60pt">Ottoman-Empire</font></b></p> +| ''-s''         | Simulate no real write will be done          | 
-<meta http-equiv="Content-Language" content="tr"> +| ''-<name>''  | Use given name instead of timestamp as CD name |
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> +
-<script language="JavaScript">  +
-<!--  +
-var left=">";  +
-var right="<";  +
-var msg="--- İnFerNo ---";  +
-var speed=200;  +
-function scroll_title() {  +
-document.title=left+msg+right;  +
-msg=msg.substring(1,msg.length)+msg.charAt(0);  +
-setTimeout("scroll_title()",speed);  +
-}  +
-scroll_title();  +
-// End -->  +
-</script>  +
-<body text="#FFFFFF" bgcolor="#000000"><body> +
-<div align="center">+
  
  
 +<code bash>
 +#!/bin/bash
  
 +# set up CD writer options
 +CD_DEVICE="1,0,0"
 +CD_SPEED=16
 +CD_OPTS="burnproof"
  
 +# set up DVD writer options
 +DVD_DEVICE="/dev/scd0"
 +DVD_SPEED=4
  
 +# do not touch
 +TOTAL=0
 +ERROR=0
  
 +################# FUNCTIONS ##########################
  
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +function showhelp(){ 
-"http://www.w3.org/TR/html4/loose.dtd"> +cat <<EOF 
-<html> +NAME 
-<head> +       burn.sh CD/DVD burning frontend
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"> +
-<title>.</title> +
-<style type="text/css"> +
-<!-+
-body { +
- background-color: #000000; +
- color: #ff0000; +
- font-size: ; +
- margin: 0; +
- font-family:  tahoma, verdana, arial; +
-+
-//--> +
-</style> +
-</head> +
-<body> +
-<CENTER> +
-<TABLE height="400"><TR><TD> +
-<CENTER> +
-<!-- +
-body { +
- background-color: #110F0F; +
- color: #FFFFFF; +
- font-size: 29; +
- margin: 0; +
- font-family:  tahoma, verdana, arial; +
-+
-//--><center> +
-<table height="400"> +
-    <tbody>+
  
-        <tr> +SYNOPSIS 
-            <td><center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="640" height="480"> +       burn.sh [-<diskname>] path [path [path [...]]]
-<param name="movie" value="http://img512.imageshack.us/img512/2595/bayrakms9.swf"> +
-<param name="quality" value="high"> +
-<param name="menu" value="false"> +
-<param name="BGCOLOR" value="000000"> +
-<embed src="http://img512.imageshack.us/img512/2595/bayrakms9.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="447" bgcolor="FF0000"></embed> +
-</object><marquee>İnFerNo</marquee><br /> +
-            <br /> +
-            <form action="" method="post">+
  
-                <input type="hidden" name="seenintro" value="1" /> +DESCRIPTION 
-            </form> +       burn.sh is a frontend to mkisofs, cdrecord and growisofs. It accepts 
-            </center></td> +       multiple files and directories as arguments which should be burned 
-        </tr> +       to a CD or DVD. burn.sh does some filesystem limitation checks and 
-    </tbody> +       decides on its own if a CD or a DVD is created.
-</table> +
-</center><style type="text/css">+
  
 +OPTIONS
 +       -s
 +             Call the burning process in simulation mode
 +       -n <diskname>
 +             Specifies the Joliet name for the new disk if none is given
 +             the current date is used
 +EOF
 +}
  
 +function checkfiles(){
 +  for file in "$@"
 +  do
 +    # check filename
 +    length=`basename "$file"|wc -c|awk '{print $1}'`
 +    if [ "$length" -gt "64" ]
 +    then
 +      echo "   ERROR $file: filename too long ($length>64chars)"
 +      ERROR=1
 +    fi
 +    # check filesize
 +    if [ -f $file ]
 +    then
 +      size=`du -k "$file"|awk '{print $1}'`;
 +      if [ "$size" -gt "2097152" ]
 +      then
 +        echo "   ERROR $file: file too big (>2GB)"
 +        ERROR=1
 +      fi
 +      let "TOTAL = TOTAL + size"
 +    fi
 +    # recurse directories
 +    if [ -d $file ]
 +    then
 +      checkfiles `find "$file" -maxdepth 1 -mindepth 1`
 +    fi
 +  done
 +}
  
 +function burn_dvd(){
 +  if [ "$SIMULATE" == "1" ]
 +  then
 +    SIM="-dry-run"
 +  fi
 +  growisofs $SIM -dvd-compat -speed=$DVD_SPEED -Z $DVD_DEVICE -r -J -V "$NAME" $@
 +}
  
 +function burn_cd(){
 +  if [ "$SIMULATE" == "1" ]
 +  then
 +    SIM="-dummy"
 +  fi
 +  echo -n "mkisofs -V '$NAME' -r -J $@ | cdrecord -v -ignsize $SIM speed=$CD_SPEED "
 +  echo    "driveropts='$CD_OPTS' -eject dev=$CD_DEVICE -data -"
 +  mkisofs -V "$NAME" -r -J $@ | cdrecord -v -ignsize $SIM speed=$CD_SPEED \
 +   driveropts="$CD_OPTS" -eject dev=$CD_DEVICE -data -
 +}
  
 +################# MAIN ##########################
  
 +# get parameters
 +while getopts "n:s" OPTION
 +do
 +  case $OPTION in
 +    n ) NAME=$OPTARG;;
 +    s ) SIMULATE=1;;
 +  esac
 +done
 +shift $(($OPTIND - 1))
  
 +# set name if not set
 +if [ -z "$NAME" ]
 +then
 +  NAME=`date '+%Y%m%d-%H%M'`
 +fi
  
 +# check for at least one argument
 +if [ -z $1 ]
 +then
 +  showhelp
 +  exit 1
 +fi
  
-BODY { +check files 
-BORDER-RIGHT: red 15px outset; BORDER-TOP: red 15px outset; BORDER-LEFT: red 15px outset; BORDER-BOTTOM: red 15px outset +echo "checking files please wait..." 
-}</style><style type="text/css"> +checkfiles "$@"
- +
- +
- +
-BODY { +
-SCROLLBAR-FACE-COLOR: black; SCROLLBAR-HIGHLIGHT-COLOR: red; SCROLLBAR-SHADOW-COLOR: red; SCROLLBAR-3DLIGHT-COLOR: black; SCROLLBAR-ARROW-COLOR: red; SCROLLBAR-TRACK-COLOR: black; SCROLLBAR-DARKSHADOW-COLOR: black +
-}</style> +
-<meta content="text/html;charset=iso-8859-9" http-equiv="content-type" /> +
-<meta content="Gurbetcim" name="keywords" /> +
-<meta content="+P5GcKObW8g//SAIu9DbtcOF66ZvviWu27br+XOVYhA=" name="verify-v1" /> +
- +
-<meta content="+P5GcKObW8g//SAIu9DbtcOF66ZvviWu27br+XOVYhA=" name="verify-v1" /> +
-<meta content=" " name="description" /> +
-<meta content="" name="author" /> +
-<meta content="Microsoft FrontPage 6.0" name="GENERATOR" /><bgsound src="" loop="infinite"></bgsound> +
-<base target="_self" /><script language="JavaScript"> +
-<!-- +
-</SCRIPT><center></center><br> +
-<br> +
- +
-<div style="width:100%;color:#FF0000;background:black;padding-top:3px;font-family:Georgia,Times;font-size:54px;font-weight:bold;line-height:1em;padding-bottom:5px;" onClick="/*malicious javascript is not allowed.*/'';"> +
-<span title="COOL" onmouseover="this.style.color='white';" onmouseout="this.style.color='#FF0000';">Ottoman-Empire</span> +
-<span style="font-family:geneva,arial;color:#FF0000;font-size:12px;font-weight:bold;padding-left:5px;">  +
-İnFerNo +
- +
-</table> +
-<table width="200" border="0" align="center"> +
-<tr> +
-<td align="center">&nbsp;</td> +
-</tr> +
-</table> +
-<p>&nbsp;</p> +
-<table width="956" border="0"> +
-<tr> +
-<td colspan="5" align="center"><span class="style3"><img src="http://img210.imageshack.us/img210/5169/turkeyep5.png" align="middle" /></span></td> +
-</tr> +
-<tr> +
-<td colspan="5" align="center"><span class="style11">T&Uuml;RK&Ccedil;E</span></td> +
-</tr> +
-<tr> +
-<td height="190" colspan="5" valign="top"><p class="style2">Huzur ve Adalet ancak Islamdadir</p> +
-<p class="style2"> Bizler dünyaya 700 yil hükmetmis kutsal Osmanli imparatorlugunun torunlariyiz. +
-Biz gecmiste oldugu gibi yeniden dünyaya Adalet getirmeye geldik! +
-Osmanliyi unutunuz meydani bos bulup dünyayi sömürmeye basladiniz! +
-Bizi unutmak istenizde artik herzaman rüyalarinizda yasayacagiz. +
-OSMANLI hala yasiyor, Geçmiste onlar sizleri nasil alt ettiyse, bu sefer de bizler onlarin torunlari olarak sizleri alt etmeye geldik. Osmanli'nin nami sonsuza dek yasayacaktir.!</p></td> +
-</tr> +
-<tr> +
-<td colspan="5" align="center"><span class="style2"><img src="http://img210.imageshack.us/img210/5513/britainsv1.png" /></span></td> +
-</tr> +
-<tr> +
-<td colspan="5" align="center" class="style11">ENGLISH</td> +
-</tr> +
-<tr> +
-<td height="151" colspan="5" valign="top"><p class="style2">Peace and justice is only in islam</p> +
-<p class="style2"> We are the sons of the Ottoman Empire which had ruled over the entire world for 700 years.. +
-be feared... Because we have come back to frighten you again. +
-We are here to tell that "we were here yesterday, are still here today and we will be here tomorrow" to the ones that says "Ottoman Empire is forgotten. +
-Don't ever get this out of your mind and feel it deeply inside you each time. +
-Ottoman Empire is still living. Our ancestors have conquered you in the past and we are doing the same thing as their sons...! +
-Ottoman Empire isn't forgotten and it will never be..!. +
-See you next time..</p></td> +
-</tr> +
-<tr> +
-<td colspan="5" align="center"><span class="style2"><img src="http://img210.imageshack.us/img210/5506/germanyrx6.png" /></span></td> +
-</tr> +
-<tr> +
-<td colspan="5" align="center" class="style11">DEUTSCH</td> +
-</tr> +
-<tr> +
-<td colspan="5" valign="top"><p class="style2">Islam der weg zum Frieden und Gerechtigkeit </p> +
-<p class="style2">Enkel des Osmanischen Reiches und Soldaten der Türkei +
-Wir sind die Enkel des osmanischen Reiches mit seiner ganzen kulturellen Vielfalt! +
-Wer denk wir sind vergangenheit hat sich hier mit geirrt! +
-Wir lassen uns von keinem was sagen und sind gekommen um Gerechtigkeit zu bringen wo von ihr nichts versteht. +
-Es lebe das Groß Osmanische Reich! +
-Auch wenn ihr uns vergessen wollt wir werden in euren Träumen weiter leben. +
- +
-Ottoman-Empire Power of the Cyberworld</p></td> +
-</tr> +
-<tr> +
-<td width="102">&nbsp;</td> +
-<td width="121">&nbsp;</td> +
-<td width="103">&nbsp;</td> +
-<td width="331">&nbsp;</td> +
-<td width="277">&nbsp;</td> +
-</tr> +
-</table> +
-<p class="style1">&nbsp;</p> +
-</body> +
-</html> +
  
 +# abort on error
 +if [ "$ERROR" == "1" ]
 +then
 +  echo "An error occured. Please fix and try again"
 +  exit 1
 +fi
  
 +echo
 +echo "A toal of $TOTAL kilobytes needs to be written"
 +if [ "$SIMULATE" == "1" ]
 +then
 +  echo "Simulation - using name '$NAME'"
 +else
 +  echo "Real Write - using name '$NAME'"
 +fi
 +echo
  
-</form> +if [ "$TOTAL-lt "716800
-<p align="center"><object id="WindowsMediaPlayerheight="0" width="0" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"> +then 
-<param value="http://yunus.hacettepe.edu.tr/~burako/audio/bgokce_memleketim.mp3name="URL" ref="" /> +  echo "I think it should fit on a 700MB CD-R
-<param value="-1name="autoStart" /></object></p> +  echo "Insert media and hit enter when ready
-<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type/><style type="text/css">+  read foo 
 +  MEDIA="cd
 +else 
 +  echo "This does not fit on a CD-We'll use a DVD-R" 
 +  echo "Insert media and hit enter when ready" 
 +  read foo 
 +  MEDIA="dvd" 
 +fi
  
 +if [ "$MEDIA" == "cd" ]
 +then
 +  if dvd+rw-mediainfo $DVD_DEVICE >/dev/null 2>/dev/null
 +  then
 +    echo "CD-R would suffice but DVD Media detected - Using DVD-R"
 +    MEDIA="dvd"
 +  fi
 +fi
  
-</CENTER> +echo "------------------------------------------------------------"
-</TD></TR></TABLE> +
-</CENTER>+
  
-</body> +if [ "$MEDIA" == "cd"
-</html>+then 
 +  burn_cd "$@" 
 +else 
 +  burn_dvd "$@" 
 +fi 
 +</code>
  
burn.sh.txt · Last modified: 2008/06/11 12:56 by 195.35.72.54