📄 setup.sh
字号:
elif test "$1" = "0"; then LIRC_DRIVER=pctv; DRIVER_PARAMETER=tty1; elif test "$1" = "a"; then LIRC_DRIVER=remotemaster; DRIVER_PARAMETER=tty1; elif test "$1" = "b"; then LIRC_DRIVER=realmagic; DRIVER_PARAMETER=tty1; elif test "$1" = "c"; then LIRC_DRIVER=slinke; DRIVER_PARAMETER=tty3; elif test "$1" = "d"; then LIRC_DRIVER=silitek; DRIVER_PARAMETER=tty1; elif test "$1" = "e"; then LIRC_DRIVER=tekram; DRIVER_PARAMETER=com1; fi } else return; fi; elif test "$1" = "5"; then dialog --clear --backtitle "$BACKTITLE" \ --title "Select your driver" \ --menu "$CONFIG_DRIVER_TEXT" 19 74 12\ 1 "Askey Magic TView CPH03x (card=1)" \ 2 "Askey/Typhoon/Anubis Magic TView CPH051/061 (bt878) (card=24)" \ 3 "AverMedia TV card (TVCapture, TVPhone) (card=6)" \ 4 "AverMedia TV card (TVCapture98, TVPhone98) (card=13/41)" \ 5 "BestBuy Easy TV (BT848) (card=55)" \ 6 "BestBuy Easy TV (BT878) (card=62)" \ 7 "Chronos Video Shuttle II (card=35)" \ 8 "Dynalink Magic TView (card=48)" \ 9 "FlyVideo II (card=8)" \ 0 "FlyVideo 98 (card=30)" \ a "FlyVideo 98/FM /2000S (card=56)" \ b "Hauppauge TV card (new I2C layer required)" \ c "Hauppauge DVB-s card (ver. 2.1)" \ d "KNC ONE TV Station (-/SE/PRO/RDS)" \ e "Lenco MXTV-9578 CP (card=50)" \ f "Miro PCTV serial port receiver" \ g "Phoebe Tv Master + FM (card=22)" \ h "PixelView PlayTV PAK (card=50)" \ i "Pixelview PlayTV pro (card=37)" \ j "Pixelview PlayTV (bt878) (Prolink PV-BT878P+, card=16)" \ k "Prolink PV-BT878P+4E (card=50)" \ l "Prolink PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM) (card=72)" \ m "ProVideo PV951 (card=42)" \ n "Technisat MediaFocus I" \ o "Tekram M230 Mach64 (and others bt829 based)" \ p "TView99 CPH063 (card=38)" \ q "Typhoon TView RDS / FM Stereo (card=53)" \ r "Winfast TV2000 (card=34)" 2> $TEMP; if test "$?" = "0"; then { set `cat $TEMP` if test "$1" = "1"; then LIRC_DRIVER=cph03x; DRIVER_PARAMETER=none; elif test "$1" = "2"; then LIRC_DRIVER=cph06x; DRIVER_PARAMETER=none; elif test "$1" = "3"; then LIRC_DRIVER=avermedia; DRIVER_PARAMETER=none; elif test "$1" = "4"; then LIRC_DRIVER=avermedia98; DRIVER_PARAMETER=none; elif test "$1" = "5"; then LIRC_DRIVER=bestbuy; DRIVER_PARAMETER=none; elif test "$1" = "6"; then LIRC_DRIVER=bestbuy2; DRIVER_PARAMETER=none; elif test "$1" = "7"; then LIRC_DRIVER=chronos; DRIVER_PARAMETER=none; elif test "$1" = "8"; then LIRC_DRIVER=cph03x; DRIVER_PARAMETER=none; elif test "$1" = "9"; then LIRC_DRIVER=flyvideo; DRIVER_PARAMETER=none; elif test "$1" = "0"; then LIRC_DRIVER=fly98; DRIVER_PARAMETER=none; elif test "$1" = "a"; then LIRC_DRIVER=fly98; DRIVER_PARAMETER=none; elif test "$1" = "b"; then LIRC_DRIVER=hauppauge; DRIVER_PARAMETER=none; elif test "$1" = "c"; then LIRC_DRIVER=hauppauge_dvb; DRIVER_PARAMETER=none; elif test "$1" = "d"; then LIRC_DRIVER=knc_one; DRIVER_PARAMETER=none; elif test "$1" = "e"; then LIRC_DRIVER=pixelview_pak; DRIVER_PARAMETER=none; elif test "$1" = "f"; then LIRC_DRIVER=pctv; DRIVER_PARAMETER=tty1; elif test "$1" = "g"; then LIRC_DRIVER=cph06x; DRIVER_PARAMETER=none; elif test "$1" = "h"; then LIRC_DRIVER=pixelview_pak; DRIVER_PARAMETER=none; elif test "$1" = "i"; then LIRC_DRIVER=pixelview_pro; DRIVER_PARAMETER=none; elif test "$1" = "j"; then LIRC_DRIVER=pixelview_bt878; DRIVER_PARAMETER=none; elif test "$1" = "k"; then LIRC_DRIVER=pixelview_pak; DRIVER_PARAMETER=none; elif test "$1" = "l"; then LIRC_DRIVER=pixelview_pro; DRIVER_PARAMETER=none; elif test "$1" = "m"; then LIRC_DRIVER=provideo; DRIVER_PARAMETER=none; elif test "$1" = "n"; then LIRC_DRIVER=mediafocusI; DRIVER_PARAMETER=none; elif test "$1" = "o"; then LIRC_DRIVER=tekram_bt829; DRIVER_PARAMETER=none; elif test "$1" = "p"; then LIRC_DRIVER=cph06x; DRIVER_PARAMETER=none; elif test "$1" = "q"; then LIRC_DRIVER=knc_one; DRIVER_PARAMETER=none; elif test "$1" = "r"; then LIRC_DRIVER=winfast_tv2000; DRIVER_PARAMETER=none; fi } else return; fi; elif test "$1" = "6"; then dialog --clear --backtitle "$BACKTITLE" \ --title "Select your driver" \ --menu "$CONFIG_DRIVER_TEXT" 11 74 4 \ 1 "SIR IrDA (built-in IR ports)" \ 2 "Tekram Irmate 210 (16x50 UART compatible serial port)" \ 3 "ITE IT8712/IT8705 CIR port (experimental, 2.4.x required)" \ 4 "Actisys Act200L SIR driver support" 2> $TEMP; if test "$?" = "0"; then { set `cat $TEMP` if test "$1" = "1"; then LIRC_DRIVER=sir; DRIVER_PARAMETER=com3; elif test "$1" = "2"; then LIRC_DRIVER=tekram; DRIVER_PARAMETER=com1; elif test "$1" = "3"; then LIRC_DRIVER=it87; DRIVER_PARAMETER=none; elif test "$1" = "4"; then LIRC_DRIVER=act200l; DRIVER_PARAMETER=com1; fi } else return; fi; elif test "$1" = "7"; then dialog --clear --backtitle "$BACKTITLE" \ --title "Select your driver" \ --menu "$CONFIG_DRIVER_TEXT" 11 74 3 \ 1 "HP iPAQ" \ 2 "Sharp Zaurus" 2> $TEMP; if test "$?" = "0"; then { set `cat $TEMP` if test "$1" = "1"; then LIRC_DRIVER=sa1100; DRIVER_PARAMETER=none; elif test "$1" = "2"; then LIRC_DRIVER=sa1100; DRIVER_PARAMETER=none; fi } else return 1; fi; elif test "$1" = "8"; then LIRC_DRIVER=udp; DRIVER_PARAMETER=none; elif test "$1" = "9"; then LIRC_DRIVER=none; DRIVER_PARAMETER=none; fi if test "$?" = "0"; then GetSelectedDriver SetPortAndIrq if test "$?" = "0"; then DriverOptions fi fi } fi }ConfigSoftware () { dialog --clear --backtitle "$BACKTITLE" \ --title "Software Configuration" \ --checklist "$CONFIG_SOFTWARE_TEXT" 13 74 5 \ 1 "Compile tools for X-Windows" $X11_WINDOWS \ 2 "Compile with DEBUG code" $DEBUG \ 3 "Disable daemonize" $NO_DAEMONIZE \ 4 "Disable long codes" $NO_LONG_CODES \ 5 "Use syslogd instead of own log-file" $USE_SYSLOG 2>$TEMP if test "$?" = "0"; then { set -- `cat $TEMP` X11_WINDOWS="off"; DEBUG="off"; NO_DAEMONIZE="off"; NO_LONG_CODES="off" USE_SYSLOG="off" for ITEM in $@; do { if test $ITEM = "\"1\""; then X11_WINDOWS="on" elif test $ITEM = "\"2\""; then DEBUG="on" elif test $ITEM = "\"3\""; then NO_DAEMONIZE="on" elif test $ITEM = "\"4\""; then NO_LONG_CODES="on" elif test $ITEM = "\"5\""; then USE_SYSLOG="on" fi } done } fi }SaveConfig () { echo "LIRC_DRIVER=$LIRC_DRIVER" >$CONFIG echo "LIRC_PORT=$LIRC_PORT" >>$CONFIG echo "LIRC_IRQ=$LIRC_IRQ" >>$CONFIG echo "LIRC_MAJOR=$LIRC_MAJOR" >>$CONFIG echo "IRTTY=$IRTTY" >>$CONFIG echo "DRIVER_PARAMETER=$DRIVER_PARAMETER" >>$CONFIG echo "SOFT_CARRIER=$SOFT_CARRIER" >>$CONFIG echo "TRANSMITTER=$TRANSMITTER" >>$CONFIG echo "TIMER=$TIMER" >>$CONFIG echo "X11_WINDOWS=$X11_WINDOWS" >>$CONFIG echo "DEBUG=$DEBUG" >>$CONFIG echo "NO_DAEMONIZE=$NO_DAEMONIZE" >>$CONFIG echo "NO_LONG_CODES=$NO_LONG_CODES" >>$CONFIG echo "USE_SYSLOG=$USE_SYSLOG" >>$CONFIG chmod 666 $CONFIG echo '#!/bin/bash' >$START echo >>$START echo "./configure \\" >>$START echo "--with-module-dir=/lib/modules/`uname -r`/misc \\" >>$START if test "$LIRC_DRIVER" = "serial"; then { if test "$SOFT_CARRIER" = "off"; then echo "--without-soft-carrier \\" >>$START; fi if test "$TRANSMITTER" = "on"; then echo "--with-transmitter \\" >>$START; fi } elif test "$LIRC_DRIVER" = "parallel"; then { if test "$TIMER" != "0"; then echo "--with-timer=$TIMER \\" >>$START; else echo "--without-timer \\" >>$START; fi } elif test "$LIRC_DRIVER" = "irman" -o "$LIRC_DRIVER" = "remotemaster" -o \ "$LIRC_DRIVER" = "logitech" -o "$LIRC_DRIVER" = "pctv" -o \ "$LIRC_DRIVER" = "slinke" -o "$LIRC_DRIVER" = "silitek" -o \ "$LIRC_DRIVER" = "realmagic"; then { echo "--with-tty=$IRTTY \\" >>$START } fi if test "$X11_WINDOWS" = "on"; then echo "--with-x \\" >>$START; else echo "--without-x \\" >>$START; fi if test "$DEBUG" = "on"; then echo "--enable-debug \\" >>$START; fi if test "$NO_DAEMONIZE" = "on"; then echo "--disable-daemonize \\" >>$START; fi if test "$NO_LONG_CODES" = "on"; then echo "--disable-long-codes \\" >>$START; fi if test "$USE_SYSLOG" = "on"; then echo "--with-syslog \\" >>$START; fi echo "--with-driver=$LIRC_DRIVER \\" >>$START echo "--with-major=$LIRC_MAJOR \\" >>$START echo "--with-port=$LIRC_PORT \\" >>$START echo "--with-irq=$LIRC_IRQ \\" >>$START echo "\"\$@\"" >>$START chmod 755 $START MESSAGE="Configuration: $CONFIG, executable shell script: $START" EXIT="yes" }############################################################################### Main Programif ! which dialog >/dev/null; then echo "dialog not found!" exit 1fiif test -f $CONFIG; then { echo "Loading saved configuration from $CONFIG" . $CONFIG sleep 1 }fiEXIT="no"MESSAGE="Abnormal Termination"GetSelectedDriverwhile test "$EXIT" != "yes"; do { dialog --clear --backtitle "$BACKTITLE" \ --title "Mainmenu" \ --menu "$MAIN_MENU_TEXT" 14 74 5 \ 1 "Driver configuration ($SELECTED_DRIVER)" \ 2 "Software configuration" \ 3 "Save configuration & run configure" \ 4 "Save configuration & exit" \ 5 "Exit WITHOUT doing anything" 2>$TEMP if test "$?" != "0"; then { MESSAGE="Configuration cancelled!" EXIT="yes" } else { set `cat $TEMP` if test "$1" = "1"; then ConfigDriver elif test "$1" = "2"; then ConfigSoftware elif test "$1" = "3"; then { SaveConfig CONFIGURE="yes" } elif test "$1" = "4"; then SaveConfig elif test "$1" = "5"; then { MESSAGE="Configuration NOT saved!" EXIT=yes } fi } fi }done#clearrm -f $TEMPecho "Written by <karsten.scheibler@bigfoot.de>, 1999-JUN-28"echoecho $MESSAGEif test "$CONFIGURE" = "yes"; then { echo "Starting the generated shell script which will call configure with the right" echo "parameters..." ./$START }fi## EOF ######################################################################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -