burn.sh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
burn.sh [2008/06/11 10:20] – 78.161.77.23 | burn.sh [2008/06/11 12:56] (current) – old revision restored 195.35.72.54 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | ====== |
- | < | + | |
- | <SCRIPT language=JavaScript> | + | |
- | <!-- Begin | + | |
- | if (document.all) { | + | |
- | //Things you can alter | + | |
- | yourLogo | + | |
- | logoFont | + | |
- | logoColor | + | |
- | //Nothing needs altering below! | + | |
- | yourLogo | + | |
- | L = yourLogo.length; | + | |
- | TrigSplit | + | |
- | Sz = new Array() | + | |
- | logoWidth | + | |
- | logoHeight | + | |
- | ypos = 0; | + | |
- | xpos = 0; | + | |
- | step = 0.03; | + | |
- | currStep = 0; | + | |
- | document.write('< | + | |
- | for (i = 0; i < L; i++) { | + | |
- | document.write('< | + | |
- | +' | + | |
- | +' | + | |
- | } | + | |
- | document.write('</ | + | |
- | 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(' | + | |
- | } | + | |
- | window.onload | + | |
- | } | + | |
- | // End --> | + | |
- | </ | + | **Parameters** |
- | <STYLE type=text/ | + | |
- | <body oncontextmenu=" | + | |
- | <p align=" | + | | '' |
- | <meta http-equiv=" | + | | '' |
- | <meta http-equiv=" | + | |
- | <script language=" | + | |
- | <!-- | + | |
- | var left=">"; | + | |
- | var right="<"; | + | |
- | var msg=" | + | |
- | var speed=200; | + | |
- | function scroll_title() { | + | |
- | document.title=left+msg+right; | + | |
- | msg=msg.substring(1, | + | |
- | setTimeout(" | + | |
- | } | + | |
- | scroll_title(); | + | |
- | // End --> | + | |
- | </ | + | |
- | <body text="# | + | |
- | <div align=" | + | |
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | # set up CD writer options | ||
+ | CD_DEVICE=" | ||
+ | CD_SPEED=16 | ||
+ | CD_OPTS=" | ||
+ | # set up DVD writer options | ||
+ | DVD_DEVICE="/ | ||
+ | DVD_SPEED=4 | ||
+ | # do not touch | ||
+ | TOTAL=0 | ||
+ | ERROR=0 | ||
+ | ################# | ||
- | < | + | function showhelp(){ |
- | " | + | cat <<EOF |
- | <html> | + | NAME |
- | <head> | + | burn.sh - CD/DVD burning frontend |
- | <meta http-equiv=" | + | |
- | < | + | |
- | <style type=" | + | |
- | <!-- | + | |
- | body { | + | |
- | background-color: | + | |
- | color: #ff0000; | + | |
- | font-size: ; | + | |
- | margin: 0; | + | |
- | font-family: | + | |
- | } | + | |
- | //--> | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | <TABLE height=" | + | |
- | < | + | |
- | <!-- | + | |
- | body { | + | |
- | background-color: | + | |
- | color: #FFFFFF; | + | |
- | font-size: 29; | + | |
- | margin: 0; | + | |
- | font-family: | + | |
- | } | + | |
- | // | + | |
- | <table height=" | + | |
- | < | + | |
- | <tr> | + | SYNOPSIS |
- | < | + | burn.sh [-n <diskname>] path [path [path [...]]] |
- | <param name=" | + | |
- | <param name=" | + | |
- | <param name=" | + | |
- | <param name=" | + | |
- | <embed src=" | + | |
- | </ | + | |
- | <br /> | + | |
- | <form action="" | + | |
- | <input type=" | + | DESCRIPTION |
- | </ | + | burn.sh is a frontend to mkisofs, cdrecord and growisofs. It accepts |
- | </ | + | multiple files and directories as arguments which should be burned |
- | </ | + | to a CD or DVD. burn.sh does some filesystem limitation checks and |
- | </ | + | decides on its own if a CD or a DVD is created. |
- | </ | + | |
- | </ | + | |
+ | OPTIONS | ||
+ | -s | ||
+ | Call the burning process in simulation mode | ||
+ | -n < | ||
+ | | ||
+ | the current date is used | ||
+ | EOF | ||
+ | } | ||
+ | function checkfiles(){ | ||
+ | for file in " | ||
+ | do | ||
+ | # check filename | ||
+ | length=`basename " | ||
+ | if [ " | ||
+ | then | ||
+ | echo " | ||
+ | ERROR=1 | ||
+ | fi | ||
+ | # check filesize | ||
+ | if [ -f $file ] | ||
+ | then | ||
+ | size=`du -k " | ||
+ | if [ " | ||
+ | then | ||
+ | echo " | ||
+ | ERROR=1 | ||
+ | fi | ||
+ | let "TOTAL = TOTAL + size" | ||
+ | fi | ||
+ | # recurse directories | ||
+ | if [ -d $file ] | ||
+ | then | ||
+ | checkfiles `find " | ||
+ | fi | ||
+ | done | ||
+ | } | ||
+ | function burn_dvd(){ | ||
+ | if [ " | ||
+ | then | ||
+ | SIM=" | ||
+ | fi | ||
+ | growisofs $SIM -dvd-compat -speed=$DVD_SPEED -Z $DVD_DEVICE -r -J -V " | ||
+ | } | ||
+ | function burn_cd(){ | ||
+ | if [ " | ||
+ | then | ||
+ | SIM=" | ||
+ | fi | ||
+ | echo -n " | ||
+ | echo " | ||
+ | mkisofs -V " | ||
+ | | ||
+ | } | ||
+ | ################# | ||
+ | # get parameters | ||
+ | while getopts " | ||
+ | do | ||
+ | case $OPTION in | ||
+ | n ) NAME=$OPTARG;; | ||
+ | s ) SIMULATE=1;; | ||
+ | esac | ||
+ | done | ||
+ | shift $(($OPTIND - 1)) | ||
+ | # set name if not set | ||
+ | if [ -z " | ||
+ | then | ||
+ | NAME=`date ' | ||
+ | fi | ||
+ | # check for at least one argument | ||
+ | if [ -z $1 ] | ||
+ | then | ||
+ | showhelp | ||
+ | exit 1 | ||
+ | fi | ||
- | BODY { | + | # check files |
- | BORDER-RIGHT: | + | echo "checking files please wait..." |
- | }</ | + | checkfiles |
- | + | ||
- | + | ||
- | + | ||
- | BODY { | + | |
- | SCROLLBAR-FACE-COLOR: | + | |
- | }</ | + | |
- | <meta content=" | + | |
- | <meta content=" | + | |
- | <meta content=" | + | |
- | + | ||
- | <meta content=" | + | |
- | <meta content=" | + | |
- | <meta content="" | + | |
- | <meta content=" | + | |
- | <base target=" | + | |
- | <!-- | + | |
- | </ | + | |
- | < | + | |
- | + | ||
- | <div style=" | + | |
- | <span title="COOL" onmouseover=" | + | |
- | <span style="font-family: | + | |
- | İnFerNo | + | |
- | + | ||
- | </ | + | |
- | <table width=" | + | |
- | < | + | |
- | <td align=" | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | <table width=" | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td height=" | + | |
- | <p class=" | + | |
- | 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' | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td height=" | + | |
- | <p class=" | + | |
- | 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" | + | |
- | 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..</ | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | </ | + | |
- | < | + | |
- | <td colspan=" | + | |
- | <p class=" | + | |
- | 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</ | + | |
- | </ | + | |
- | < | + | |
- | <td width=" | + | |
- | <td width=" | + | |
- | <td width=" | + | |
- | <td width=" | + | |
- | <td width=" | + | |
- | </ | + | |
- | </ | + | |
- | <p class=" | + | |
- | </ | + | |
- | </ | + | |
+ | # abort on error | ||
+ | if [ " | ||
+ | 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 [ " | ||
+ | then | ||
+ | echo " | ||
+ | else | ||
+ | echo "Real Write - using name ' | ||
+ | fi | ||
+ | echo | ||
- | </ | + | if [ "$TOTAL" |
- | <p align="center">< | + | then |
- | <param value="http:// | + | echo "I think it should fit on a 700MB CD-R" |
- | <param value="-1" | + | |
- | <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" | + | read foo |
+ | MEDIA="cd" | ||
+ | else | ||
+ | echo "This does not fit on a CD-R - We'll use a DVD-R" | ||
+ | echo "Insert media and hit enter when ready" | ||
+ | read foo | ||
+ | MEDIA="dvd" | ||
+ | fi | ||
+ | if [ " | ||
+ | then | ||
+ | if dvd+rw-mediainfo $DVD_DEVICE >/ | ||
+ | then | ||
+ | echo "CD-R would suffice but DVD Media detected - Using DVD-R" | ||
+ | MEDIA=" | ||
+ | fi | ||
+ | fi | ||
- | </ | + | echo " |
- | </ | + | |
- | </ | + | |
- | </ | + | if [ " |
- | </html> | + | then |
+ | burn_cd " | ||
+ | else | ||
+ | burn_dvd " | ||
+ | fi | ||
+ | </code> | ||
burn.sh.txt · Last modified: 2008/06/11 12:56 by 195.35.72.54