Script "gegenlesen"

Dieses Thema im Forum "Shell-Skripte" wurde erstellt von ragnar, 23.04.2011.

  1. ragnar

    ragnar Doppel-As

    Dabei seit:
    25.10.2004
    Beiträge:
    139
    Zustimmungen:
    0
    Ort:
    Düsseldorf
    Mahlzeit,

    ich bin nicht grade der Profi im Script schreiben. Kann einer mal mein Script durchsehen und evtl. ein paar hinweise geben was ich besser machen könnte?

    Code:
    #!/bin/bash
    
    #
    # This is my install script, which copy all files from freemint cvs
    # to build a "ready to copy" package. So far, no init, fvdi or
    # documentation has been included. You have to do it by yourself.
    #
    # Gnu Public Licens 3 bye Bernd Mueller <ragnar76@googlemail.com>
    #
    
    #
    # right now, there is no error handling everwhere. be warned and
    # carefull
    #
    
    
    # define path
    PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
    
    # set version here
    VER="1-18-cur"
    MYCOMP="ara"
    STRIPPER="m68k-atari-mint-strip"
    # STRIPPER="strip"
    DATE=$(date +%d-%m-%Y)
    
    
    # make some tests
    function tests()
    {
    	case $(uname -s) in
    	        Linux)
    	        if type -P m68k-atari-mint-gcc >/dev/null; then
    	                echo "Linux and a crosscompiler found"
    	                do_download
    	        else
    	                echo "Linux but no crosscompiler found.  Aborting!"
    	                exit 0
    	        fi
    	        ;;
    	
    	        FreeMiNT)
    	        if type -p gcc >/dev/null; then
    	                echo "FreeMiNT found with native gcc"
    	                do_download
    	        else
    	                echo "FreeMiNT found but no gcc.  Aborting"
    	                exit 0
    	        fi
    	        ;;
    
    	        *) echo "Unknown System. Aborting" exit 0 ;;
    	esac
    }
    
    function do_download()
    {
    	cvs -z3 -d:pserver:cvsanon:cvsanon@sparemint.org:/mint co freemint
    	do_compile
    }
    
    function do_compile()
    {
    	cd freemint
    	make CROSS=yes
    	cd ..
    	do_install
    }
    	
    function do_install()
    {
    	cd freemint
    	
    	# make some directories
    	mkdir install
    	mkdir install/auto
    	mkdir install/mint
    	mkdir install/mint/kernel
    	mkdir install/mint/tables
    	mkdir install/mint/drivers
    	mkdir install/mint/drivers/xdd
    	mkdir install/mint/drivers/xfs
    	mkdir install/mint/drivers/xif
    	mkdir install/mint/$VER
    	mkdir install/mint/$VER/xaaes
    	mkdir install/mint/$VER/xaaes/img
    	mkdir install/mint/$VER/xaaes/img/8b
    	mkdir install/mint/$VER/xaaes/img/hc
    	mkdir install/mint/$VER/xaaes/widgets
    	mkdir install/mint/$VER/xaaes/xobj
    	mkdir install/mint/$VER/xaaes/doc
    
    	# now install the files
    	echo " Installing Kernels "
    	echo "===================="
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_$MYCOMP/mint$MYCOMP.prg install/auto
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_$MYCOMP/mint$MYCOMP.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_000/mint000.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_020/mint020.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_030/mint030.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_040/mint040.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_060/mint060.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_mil/mintmil.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_col/mintv4e.prg install/mint/kernel
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/.compile_deb/mintdeb.prg install/mint/kernel
    	install -v -b --mode=0644 doc/examples/mint.cnf install/mint/$VER
    
    	echo -e "\n"
    	echo " Installing Drivers "
    	echo "===================="
    	find sys/ -name '*.xdd' -exec /usr/bin/install -v -b --mode=0644 --strip --strip-program=$STRIPPER {} install/mint/drivers/xdd \;
    	find sys/ -name '*.xfs' -not -name 'Makefile.xfs' -exec /usr/bin/install -v -b --mode=0644 --strip --strip-program=$STRIPPER {} install/mint/drivers/xfs \;
    
    	echo -e "\n"
    	echo " Installing Sockets "
    	echo "===================="
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/biodma.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/de600.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/dial.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/dummy.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/lance.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/pamsdma.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/plip.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rieblmst_fast.xif install/mint/drivers/xif/rblmstfs.xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rieblmst.xif install/mint/drivers/xif/rblmst.xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rieblspc_fast.xif install/mint/drivers/xif/rblspcfa
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rieblspc.xif install/mint/drivers/xif/
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rieblste.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/riebltt.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rtl8012st.xif install/mint/drivers/xif/rtl812st.xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/rtl8012.xif	install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/slip.xif install/mint/drivers/xif
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER sys/sockets/xif/nfeth/nfeth.xif install/mint/drivers/xif
    
    	echo -e "\n"
    	echo " Installing Keyboard Tables "
    	echo "============================"
    	install -v -b --mode=0644 sys/tbl/Czech/czech_iso.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Czech/czech_kam.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Spain/spanish.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Germany/german.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Switzerland/swiss_french.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Switzerland/swiss_german.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Italy/italian.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/France/french.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/swiss_french-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/french-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/spanish-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/british-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/swiss_german-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/german-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/italian-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Poland/usa-pl.tbl install/mint/tables
    	install -v -b --mode=0644 sys/tbl/Britain/british.tbl install/mint/tables
    
    	echo -e "\n"
    	echo " Install XaAES Core "
    	echo "===================="
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/adi/whlmoose/moose.adi install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/adi/whlmoose/moose_w.adi install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaes030.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaes000.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaesst.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaes060.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaes040.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaesv4e.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaaesdeb.km install/mint/$VER/xaaes
    	install -v -b --mode=0644 --strip --strip-program=$STRIPPER xaaes/src.km/xaloader/xaloader.prg install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xaaes.cnf install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xaaes009.rsc install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xaaes_de.rsc install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xaaeswdg.rsc install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xa_mono.rsc install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/xa_xtobj.rsc install/mint/$VER/xaaes
    	install -v -b --mode=0644 xaaes/src.km/CHANGES.txt install/mint/$VER/xaaes/doc
    	install -v -b --mode=0644 xaaes/src.km/newcalls.txt install/mint/$VER/xaaes/doc 
    	install -v -b --mode=0644 xaaes/src.km/README-misbehavers.txt install/mint/$VER/xaaes/doc
    	install -v -b --mode=0644 xaaes/src.km/xa_he_de.txt install/mint/$VER/xaaes/doc
    	install -v -b --mode=0644 xaaes/src.km/xa_help.txt install/mint/$VER/xaaes
    
    	echo -e "\n"
    	echo -e " Install XaAES Data "
    	echo -e "===================="
    	install -v -b --mode=0644 xaaes/src.km/img/8b/dbox.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/dbutton.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/dtext.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/exterior.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/info.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/popbkg.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/slide.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/slider.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/slwtitle.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/8b/wtitle.img install/mint/$VER/xaaes/img/8b
    	install -v -b --mode=0644 xaaes/src.km/img/hc/dbox.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/dbutton.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/dtext.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/exterior.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/info.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/popbkg.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/slide.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/slider.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/img/hc/wtitle.img install/mint/$VER/xaaes/img/hc
    	install -v -b --mode=0644 xaaes/src.km/widgets/adam.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/baroqwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/cbox1214.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/cboxwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/cboxwidg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/gemjwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/gilwidg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/homwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/ligt_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/magicwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/mbox1214.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/mboxwdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/mboxwidg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/monowidg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/nine-ozk.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/nine_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/nine-wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/pas_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/ronb_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/rondswdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/rond_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/styl_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/w98_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/win_wdg.rsc install/mint/$VER/xaaes/widgets
    	install -v -b --mode=0644 xaaes/src.km/widgets/xaaeswdg.rsc install/mint/$VER/xaaes/widgets
    
    	echo -e "\n"
    	echo -e " Inserting TeraDesk "
    	echo -e "===================="
    	cd install/mint/$VER/
    
    
    	wget -q -T0 -t0 http://solair.eunet.rs/~vdjole/tera403b.zip
    	unzip -qq -X -K -d teradesk tera403b.zip
    	rm tera403b.zip
    	cd teradesk
    
    # here's a small hack. some zipfile created on atari do not have
    # the right file permissions on unix fs.
    	find . -name '*' -type f -exec /bin/chmod 0644 {} \;
    	find . -name '*' -type d -exec /bin/chmod 0755 {} \;
     	cd ../../..
    
    # for debugging
    	echo "current working dir is: "
    	pwd
    
    	do_package
    }
    
    function do_package()
    {
    	tar -cf ../../freemint-${DATE}.tar auto mint
    	xz -9 -z -e ../../freemint-${DATE}.tar
    }
    
    tests
    
    Danke schön
    Bernd
     
  2. Anzeige

    Schau dir mal diese Kategorie an. Dort findest du bestimmt etwas.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
Thema:

Script "gegenlesen"

Die Seite wird geladen...

Script "gegenlesen" - Ähnliche Themen

  1. Bräuchte Hilfe bei Backupscript mittels Bash und cronjob

    Bräuchte Hilfe bei Backupscript mittels Bash und cronjob: Es soll für bestimmte Ordner Archivierung aller Dateien(Logfiles), die älter als 30 Tage sind machen. Am besten einmal täglich nachts irgendwann....
  2. Bashscript aus Debian6 läuft nicht auf Debian7

    Bashscript aus Debian6 läuft nicht auf Debian7: Hallo an alle, nachdem ich ein Skript von squeeze auf wheezy kopiert habe und ausführte, erschienen gleich wilde Fehlermeldungen, nach denen ich...
  3. Shell Script Problem

    Shell Script Problem: Hallo zusammen, ich arbeite momentan mit einem Plagiat Tool, die ich über Git Bash ausführe. Es wird im Endeffekt ein Link generiert, die ich...
  4. Externes Programm mit Script ausführen?

    Externes Programm mit Script ausführen?: Hallo, ich würde gern ein Script zum klonen von festplatten schreiben z.B. mit dem Programm Mondo Rescue. Ist es möglich externen Programmen...
  5. sh Script zum Autostart

    sh Script zum Autostart: hallo liebe Mitglieder, wenn ich unter Linux eins meiner Shell Skripte im Autostart haben will nutze ich immer die @reboot Funktion im crontab....