3 addons
="WEBIF WEBIF_LIVELOG WEBIF_JQUERY TOUCH WITH_SSL HAVE_DVBAPI WITH_EXTENDED_CW WITH_NEUTRINO READ_SDT_CHARSETS CS_ANTICASC WITH_DEBUG MODULE_MONITOR WITH_LB CS_CACHEEX CS_CACHEEX_AIO CW_CYCLE_CHECK LCDSUPPORT LEDSUPPORT CLOCKFIX IPV6SUPPORT WITH_ARM_NEON"
4 protocols
="MODULE_CAMD33 MODULE_CAMD35 MODULE_CAMD35_TCP MODULE_NEWCAMD MODULE_CCCAM MODULE_CCCSHARE MODULE_GBOX MODULE_RADEGAST MODULE_SCAM MODULE_SERIAL MODULE_CONSTCW MODULE_PANDORA MODULE_GHTTP MODULE_STREAMRELAY"
5 readers
="READER_NAGRA READER_NAGRA_MERLIN READER_IRDETO READER_CONAX READER_CRYPTOWORKS READER_SECA READER_VIACCESS READER_VIDEOGUARD READER_DRE READER_TONGFANG READER_BULCRYPT READER_GRIFFIN READER_DGCRYPT"
6 card_readers
="CARDREADER_PHOENIX CARDREADER_INTERNAL CARDREADER_SC8IN1 CARDREADER_MP35 CARDREADER_SMARGO CARDREADER_DB2COM CARDREADER_STAPI CARDREADER_STAPI5 CARDREADER_STINGER CARDREADER_DRECAS"
10 CONFIG_WEBIF_LIVELOG=y
15 # CONFIG_WITH_EXTENDED_CW=n
16 # CONFIG_WITH_NEUTRINO=n
17 CONFIG_READ_SDT_CHARSETS=y
18 # CONFIG_CS_ANTICASC=n
20 CONFIG_MODULE_MONITOR=y
23 # CONFIG_CS_CACHEEX_AIO=n
24 # CONFIG_CW_CYCLE_CHECK=n
28 # CONFIG_IPV6SUPPORT=n
29 # CONFIG_WITH_ARM_NEON=n
30 # CONFIG_MODULE_CAMD33=n
31 CONFIG_MODULE_CAMD35=y
32 CONFIG_MODULE_CAMD35_TCP=y
33 CONFIG_MODULE_NEWCAMD=y
35 CONFIG_MODULE_CCCSHARE=y
37 # CONFIG_MODULE_RADEGAST=n
38 # CONFIG_MODULE_SERIAL=n
39 # CONFIG_MODULE_CONSTCW=n
40 # CONFIG_MODULE_PANDORA=n
41 # CONFIG_MODULE_SCAM=n
42 # CONFIG_MODULE_GHTTP=n
43 # CONFIG_MODULE_STREAMRELAY=n
44 CONFIG_WITH_CARDREADER=y
45 CONFIG_READER_NAGRA_COMMON=y
47 CONFIG_READER_NAGRA_MERLIN=y
48 CONFIG_READER_IRDETO=y
50 CONFIG_READER_CRYPTOWORKS=y
52 CONFIG_READER_VIACCESS=y
53 CONFIG_READER_VIDEOGUARD=y
55 CONFIG_READER_TONGFANG=y
56 CONFIG_READER_BULCRYPT=y
57 CONFIG_READER_GRIFFIN=y
58 CONFIG_READER_DGCRYPT=y
68 # CARDREADER_STINGER=n
74 Usage: `basename $0` [parameters]
76 -g, --gui Start interactive configuration
78 -s, --show-enabled [param] Show enabled configuration options.
79 -Z, --show-disabled [param] Show disabled configuration options.
80 -S, --show-valid [param] Show valid configuration options.
81 Possible params: all, addons, protocols,
84 -l, --list-config List active configuration variables.
85 -e, --enabled [option] Check if certain option is enabled.
86 -d, --disabled [option] Check if certain option is disabled.
88 -E, --enable [option] Enable config option.
89 -D, --disable [option] Disable config option.
91 The following [option]s enable or disable multiple settings.
94 protocols - All protocols.
95 readers - All readers.
96 card_readers - All card readers.
98 -R, --restore Restore default config.
100 -v, --oscam-version Display OSCam version.
101 -r, --oscam-revision Display OSCam SVN revision.
103 -O, --detect-osx-sdk-version Find where OS X SDK is located
105 -h, --help Display this help text.
108 # Enable WEBIF and SSL
109 ./config.sh --enable WEBIF WITH_SSL
111 # Disable WEBIF but enable WITH_SSL
112 ./config.sh --disable WEBIF --enable WITH_SSL
114 # Restore defaults and disable WEBIF and READER_NAGRA
115 ./config.sh --restore --disable WEBIF READER_NAGRA
117 # Use default config with only one enabled reader
118 ./config.sh --restore --disable readers --enable READER_BULCRYPT
120 # Disable everything and enable webif one module and one card reader
121 ./config.sh --disable all --enable WEBIF MODULE_NEWCAMD READER_BULCRYPT
123 # Disable all card readers except INTERNAL
124 ./config.sh -D card_readers -E CARDREADER_INTERNAL
128 protocols: $protocols
130 card_readers: $card_readers
134 # Output directory for config.mak set by --objdir parameter
137 # Use flags set by --use-flags parameter
141 for FLAG
in $USE_FLAGS
143 [ "$FLAG" = "$1" ] && return 0
150 have_flag
$opt ||
return 1
157 have_flag
$opt && return 0
163 for FLAG
in $USE_FLAGS
165 [ "$FLAG" = "$1" ] && return 1
170 not_have_all_flags
() {
172 not_have_flag
$opt ||
return 1
177 not_have_any_flags
() {
179 not_have_flag
$opt && return 0
186 grep "^\#define $1 1$" config.h
>/dev
/null
2>/dev
/null
191 grep "^\#define $1 1$" config.h
>/dev
/null
2>/dev
/null
192 test $?
= 0 && return 1
198 enabled
$opt ||
return 1
205 disabled
$opt ||
return 1
212 enabled
$opt && return 0
219 disabled
$opt && return 0
227 enabled
$OPT && echo $OPT
234 disabled
$OPT && echo $OPT
239 defined_file
="webif/is_defined.txt"
240 pages_c
="webif/pages.c"
241 rm -f $defined_file $pages_c 2>/dev
/null
242 for OPT
in $
(get_opts
) WITH_CARDREADER
244 enabled
$OPT && printf "%s\n" $OPT >> $defined_file
249 [ "$1" = "WITH_CARDREADER" ] && return 0 # Special case
250 echo $addons $protocols $readers $card_readers |
grep -w "$1" >/dev
/null
255 valid_opt
$1 && disabled
$1 && {
256 sed -e "s|//#define $1 1$|#define $1 1|g" config.h
> config.h.tmp
&& \
257 mv config.h.tmp config.h
270 valid_opt
$1 && enabled
$1 && {
271 sed -e "s|#define $1 1$|//#define $1 1|g" config.h
> config.h.tmp
&& \
272 mv config.h.tmp config.h
287 'addons') OPTS
="$addons" ; ;;
288 'protocols') OPTS
="$protocols" ; ;;
289 'readers') OPTS
="$readers" ; ;;
290 'card_readers') OPTS
="$card_readers" ; ;;
291 *) OPTS
="$addons $protocols $readers $card_readers" ; ;;
297 # Calculate dependencies
298 enabled_any $
(get_opts readers
) $
(get_opts card_readers
) && enable_opt WITH_CARDREADER
>/dev
/null
299 disabled_all $
(get_opts readers
) $
(get_opts card_readers
) && disable_opt WITH_CARDREADER
>/dev
/null
300 disabled WEBIF
&& disable_opt WEBIF_LIVELOG
>/dev
/null
301 disabled WEBIF
&& disable_opt WEBIF_JQUERY
>/dev
/null
302 enabled MODULE_CCCSHARE
&& enable_opt MODULE_CCCAM
>/dev
/null
303 enabled_any CARDREADER_DB2COM CARDREADER_MP35 CARDREADER_SC8IN1 CARDREADER_STINGER
&& enable_opt CARDREADER_PHOENIX
>/dev
/null
304 enabled CS_CACHEEX_AIO
&& enable_opt CS_CACHEEX
>/dev
/null
310 have_flag USE_STAPI
&& echo "CONFIG_WITH_STAPI=y" ||
echo "# CONFIG_WITH_STAPI=n"
311 have_flag USE_STAPI5
&& echo "CONFIG_WITH_STAPI5=y" ||
echo "# CONFIG_WITH_STAPI5=n"
312 have_flag USE_COOLAPI
&& echo "CONFIG_WITH_COOLAPI=y" ||
echo "# CONFIG_WITH_COOLAPI=n"
313 have_flag USE_COOLAPI2
&& echo "CONFIG_WITH_COOLAPI2=y" ||
echo "# CONFIG_WITH_COOLAPI2=n"
314 have_flag USE_SU980
&& echo "CONFIG_WITH_SU980=y" ||
echo "# CONFIG_WITH_SU980=n"
315 have_flag USE_AZBOX
&& echo "CONFIG_WITH_AZBOX=y" ||
echo "# CONFIG_WITH_AZBOX=n"
316 have_flag USE_MCA
&& echo "CONFIG_WITH_MCA=y" ||
echo "# CONFIG_WITH_MCA=n"
317 have_flag USE_LIBCRYPTO
&& echo "CONFIG_WITH_LIBCRYPTO=y" ||
echo "# CONFIG_WITH_LIBCRYPTO=n"
318 for OPT
in $addons $protocols WITH_CARDREADER
$readers
320 enabled
$OPT && echo "CONFIG_$OPT=y" ||
echo "# CONFIG_$OPT=n"
322 for OPT
in $card_readers
324 if [ $OPT = CARDREADER_INTERNAL
]
326 # Internal card reader is actually three different readers depending on USE flags
327 enabled
$OPT && have_flag USE_AZBOX
&& echo "CONFIG_${OPT}_AZBOX=y" ||
echo "# CONFIG_${OPT}_AZBOX=n"
328 enabled
$OPT && have_any_flags USE_COOLAPI USE_SU980
&& echo "CONFIG_${OPT}_COOLAPI=y" ||
echo "# CONFIG_${OPT}_COOLAPI=n"
329 enabled
$OPT && have_flag USE_COOLAPI2
&& echo "CONFIG_${OPT}_COOLAPI2=y" ||
echo "# CONFIG_${OPT}_COOLAPI2=n"
330 enabled
$OPT && not_have_all_flags USE_AZBOX USE_COOLAPI USE_COOLAPI2 USE_SU980
&& echo "CONFIG_${OPT}_SCI=y" ||
echo "# CONFIG_${OPT}_SCI=n"
333 if [ $OPT = CARDREADER_STAPI
]
335 # Enable CARDREADER_STAPI only if USE_STAPI is set
336 enabled
$OPT && have_flag USE_STAPI
&& echo "CONFIG_$OPT=y" ||
echo "# CONFIG_$OPT=n"
339 if [ $OPT = CARDREADER_STAPI5
]
341 # Enable CARDREADER_STAPI5 only if USE_STAPI5 is set
342 enabled
$OPT && have_flag USE_STAPI5
&& echo "CONFIG_$OPT=y" ||
echo "# CONFIG_$OPT=n"
345 enabled
$OPT && echo "CONFIG_$OPT=y" ||
echo "# CONFIG_$OPT=n"
347 have_flag USE_LIBUSB
&& echo "CONFIG_CARDREADER_SMART=y" ||
echo "# CONFIG_CARDREADER_SMART=n"
348 have_flag USE_PCSC
&& echo "CONFIG_CARDREADER_PCSC=y" ||
echo "# CONFIG_CARDREADER_PCSC=n"
349 # Extra modules/libraries
350 enabled_any MODULE_GBOX WEBIF
&& echo "CONFIG_LIB_MINILZO=y" ||
echo "# CONFIG_LIB_MINILZO=n"
351 not_have_flag USE_LIBCRYPTO
&& echo "CONFIG_LIB_AES=y" ||
echo "# CONFIG_LIB_AES=n"
352 enabled MODULE_CCCAM
&& echo "CONFIG_LIB_RC6=y" ||
echo "# CONFIG_LIB_RC6=n"
353 not_have_flag USE_LIBCRYPTO
&& enabled MODULE_CCCAM
&& echo "CONFIG_LIB_SHA1=y" ||
echo "# CONFIG_LIB_SHA1=n"
354 enabled_any READER_DRE MODULE_SCAM READER_VIACCESS READER_NAGRA READER_NAGRA_MERLIN READER_VIDEOGUARD READER_CONAX
&& echo "CONFIG_LIB_DES=y" ||
echo "# CONFIG_LIB_DES=n"
355 enabled_any MODULE_CCCAM READER_NAGRA READER_NAGRA_MERLIN READER_SECA
&& echo "CONFIG_LIB_IDEA=y" ||
echo "# CONFIG_LIB_IDEA=n"
356 not_have_flag USE_LIBCRYPTO
&& enabled_any READER_CONAX READER_CRYPTOWORKS READER_NAGRA READER_NAGRA_MERLIN
&& echo "CONFIG_LIB_BIGNUM=y" ||
echo "# CONFIG_LIB_BIGNUM=n"
357 enabled READER_NAGRA_MERLIN
&& echo "CONFIG_LIB_MDC2=y" ||
echo "# CONFIG_LIB_MDC2=n"
358 enabled READER_NAGRA_MERLIN
&& echo "CONFIG_LIB_FAST_AES=y" ||
echo "# CONFIG_LIB_FAST_AES=n"
359 enabled READER_NAGRA_MERLIN
&& echo "CONFIG_LIB_SHA256=y" ||
echo "# CONFIG_LIB_SHA256=n"
360 enabled_any READER_NAGRA READER_NAGRA_MERLIN
&& echo "CONFIG_READER_NAGRA_COMMON=y" ||
echo "# CONFIG_READER_NAGRA_COMMON=n"
364 OPENSSL
=$
(which openssl
2>/dev
/null
)
365 if [ "$OPENSSL" = "" ]
367 echo "// openssl not found!"
368 echo "const char *config_mak = \"CFG: openssl not found in PATH!\";"
370 echo "// This file is generated by ./config.sh --objdir $OBJDIR --make-config.mak"
371 echo "const char *config_mak ="
372 printf " \"\\\nCFG: strings FILE | sed -n 's/^CFG~//p' | openssl enc -d -base64 | gzip -d\\\n\"\n"
373 gzip -9 < $OBJDIR/config.mak |
$OPENSSL enc
-base64 |
while read LINE
375 printf " \"CFG~%s\\\\n\"\n" "$LINE"
382 TMPFILE
=$
(mktemp
-t config.mak.XXXXXX
) ||
exit 1
383 list_config
> $TMPFILE
384 [ ! -d $OBJDIR ] && mkdir
-p $OBJDIR 2>/dev
/null
385 cmp $TMPFILE $OBJDIR/config.mak
>/dev
/null
2>/dev
/null
388 cat $TMPFILE > $OBJDIR/config.mak
389 make_config_c
> $OBJDIR/config.c
391 make_config_c
> $TMPFILE
392 cmp $TMPFILE $OBJDIR/config.c
>/dev
/null
2>/dev
/null
393 [ $?
!= 0 ] && cat $TMPFILE > $OBJDIR/config.c
399 if [ "$(cat $tempfileconfig | grep "^
#define $1 1$")" != "" ]; then
408 sed -e "s/^#define ${i} 1$/\/\/#define ${i} 1/g" $tempfileconfig > ${tempfileconfig}.tmp && \
409 mv ${tempfileconfig}.tmp $tempfileconfig
414 for i in $(cat $tempfile); do
415 strip=$(echo $i | sed "s
/\"//g
")
416 sed -e "s
/\
/\
/#define ${strip} 1$/#define ${strip} 1/g" $tempfileconfig > ${tempfileconfig}.tmp && \
417 mv ${tempfileconfig}.tmp
$tempfileconfig
423 echo "You have selected the following components:"
427 printf "\t%-20s: %s\n" $i $
(check_test
"$i")
432 for i
in $protocols; do
433 printf "\t%-20s: %s\n" $i $
(check_test
"$i")
438 for i
in $readers; do
439 printf "\t%-20s: %s\n" $i $
(check_test
"$i")
444 for i
in $card_readers; do
445 printf "\t%-20s: %s\n" $i $
(check_test
"$i")
448 cp -f $tempfileconfig $configfile
452 ${DIALOG} --checklist "\nChoose add-ons:\n " $height $width $listheight \
453 WEBIF
"Web Interface" $
(check_test
"WEBIF") \
454 WEBIF_LIVELOG
"LiveLog" $
(check_test
"WEBIF_LIVELOG") \
455 WEBIF_JQUERY
"Jquery onboard (if disabled webload)" $
(check_test
"WEBIF_JQUERY") \
456 TOUCH
"Touch Web Interface" $
(check_test
"TOUCH") \
457 WITH_SSL
"OpenSSL support" $
(check_test
"WITH_SSL") \
458 HAVE_DVBAPI
"DVB API" $
(check_test
"HAVE_DVBAPI") \
459 WITH_EXTENDED_CW
"DVB API EXTENDED CW API" $
(check_test
"WITH_EXTENDED_CW") \
460 WITH_NEUTRINO
"Neutrino support" $
(check_test
"WITH_NEUTRINO") \
461 READ_SDT_CHARSETS
"DVB API read-sdt charsets" $
(check_test
"READ_SDT_CHARSETS") \
462 CS_ANTICASC
"Anti cascading" $
(check_test
"CS_ANTICASC") \
463 WITH_DEBUG
"Debug messages" $
(check_test
"WITH_DEBUG") \
464 MODULE_MONITOR
"Monitor" $
(check_test
"MODULE_MONITOR") \
465 WITH_LB
"Loadbalancing" $
(check_test
"WITH_LB") \
466 CS_CACHEEX
"Cache exchange" $
(check_test
"CS_CACHEEX") \
467 CS_CACHEEX_AIO
"Cache exchange aio (depend on Cache exchange)" $
(check_test
"CS_CACHEEX_AIO") \
468 CW_CYCLE_CHECK
"CW Cycle Check" $
(check_test
"CW_CYCLE_CHECK") \
469 LCDSUPPORT
"LCD support" $
(check_test
"LCDSUPPORT") \
470 LEDSUPPORT
"LED support" $
(check_test
"LEDSUPPORT") \
471 CLOCKFIX
"Clockfix (disable on old systems!)" $
(check_test
"CLOCKFIX") \
472 IPV6SUPPORT
"IPv6 support (experimental)" $
(check_test
"IPV6SUPPORT") \
473 WITH_ARM_NEON
"ARM NEON (SIMD/MPE) support" $
(check_test
"WITH_ARM_NEON") \
477 if [ $opt != 0 ]; then return; fi
479 disable_all
"$addons"
484 ${DIALOG} --checklist "\nChoose protocols:\n " $height $width $listheight \
485 MODULE_CAMD33
"camd 3.3" $
(check_test
"MODULE_CAMD33") \
486 MODULE_CAMD35
"camd 3.5 UDP" $
(check_test
"MODULE_CAMD35") \
487 MODULE_CAMD35_TCP
"camd 3.5 TCP" $
(check_test
"MODULE_CAMD35_TCP") \
488 MODULE_NEWCAMD
"newcamd" $
(check_test
"MODULE_NEWCAMD") \
489 MODULE_CCCAM
"CCcam" $
(check_test
"MODULE_CCCAM") \
490 MODULE_CCCSHARE
"CCcam share" $
(check_test
"MODULE_CCCSHARE") \
491 MODULE_GBOX
"gbox" $
(check_test
"MODULE_GBOX") \
492 MODULE_RADEGAST
"radegast" $
(check_test
"MODULE_RADEGAST") \
493 MODULE_SERIAL
"Serial" $
(check_test
"MODULE_SERIAL") \
494 MODULE_CONSTCW
"constant CW" $
(check_test
"MODULE_CONSTCW") \
495 MODULE_PANDORA
"Pandora" $
(check_test
"MODULE_PANDORA") \
496 MODULE_GHTTP
"Ghttp" $
(check_test
"MODULE_GHTTP") \
497 MODULE_SCAM
"scam" $
(check_test
"MODULE_SCAM") \
498 MODULE_STREAMRELAY
"Stream Relay" $
(check_test
"MODULE_STREAMRELAY") \
502 if [ $opt != 0 ]; then return; fi
504 disable_all
"$protocols"
509 ${DIALOG} --checklist "\nChoose readers (CA systems):\n " $height $width $listheight \
510 READER_NAGRA
"Nagravision" $
(check_test
"READER_NAGRA") \
511 READER_NAGRA_MERLIN
"Nagra Merlin" $
(check_test
"READER_NAGRA_MERLIN") \
512 READER_IRDETO
"Irdeto" $
(check_test
"READER_IRDETO") \
513 READER_CONAX
"Conax" $
(check_test
"READER_CONAX") \
514 READER_CRYPTOWORKS
"Cryptoworks" $
(check_test
"READER_CRYPTOWORKS") \
515 READER_SECA
"Seca" $
(check_test
"READER_SECA") \
516 READER_VIACCESS
"Viaccess" $
(check_test
"READER_VIACCESS") \
517 READER_VIDEOGUARD
"NDS Videoguard" $
(check_test
"READER_VIDEOGUARD") \
518 READER_DRE
"DRE Crypt" $
(check_test
"READER_DRE") \
519 READER_TONGFANG
"Tongfang" $
(check_test
"READER_TONGFANG") \
520 READER_BULCRYPT
"Bulcrypt" $
(check_test
"READER_BULCRYPT") \
521 READER_GRIFFIN
"Griffin" $
(check_test
"READER_GRIFFIN") \
522 READER_DGCRYPT
"DGCrypt" $
(check_test
"READER_DGCRYPT") \
526 if [ $opt != 0 ]; then return; fi
528 disable_all
"$readers"
532 menu_card_readers
() {
533 ${DIALOG} --checklist "\nChoose card reader drivers:\n " $height $width $listheight \
534 CARDREADER_PHOENIX
"Phoenix/mouse" $
(check_test
"CARDREADER_PHOENIX") \
535 CARDREADER_INTERNAL
"Internal (Sci,Azbox,Cool)" $
(check_test
"CARDREADER_INTERNAL") \
536 CARDREADER_SC8IN1
"SC8in1" $
(check_test
"CARDREADER_SC8IN1") \
537 CARDREADER_MP35
"AD-Teknik MP 3.6/USB Phoenix" $
(check_test
"CARDREADER_MP35") \
538 CARDREADER_SMARGO
"Argolis Smargo Smartreader" $
(check_test
"CARDREADER_SMARGO") \
539 CARDREADER_DB2COM
"dbox2" $
(check_test
"CARDREADER_DB2COM") \
540 CARDREADER_STAPI
"STAPI" $
(check_test
"CARDREADER_STAPI") \
541 CARDREADER_STAPI5
"STAPI5" $
(check_test
"CARDREADER_STAPI5") \
542 CARDREADER_STINGER
"STINGER" $
(check_test
"CARDREADER_STINGER") \
543 CARDREADER_DRECAS
"DRECAS" $
(check_test
"CARDREADER_DRECAS") \
547 if [ $opt != 0 ]; then return; fi
549 disable_all
"$card_readers"
559 DIALOG
=${DIALOG:-`which dialog`}
560 if [ -z "${DIALOG}" ]; then
561 echo "Please install dialog package." 1>&2
566 tempfile
=$
(mktemp
-t oscam-config.dialog.XXXXXX
) ||
exit 1
567 tempfileconfig
=$
(mktemp
-t oscam-config.h.XXXXXX
) ||
exit 1
568 trap 'rm -f $tempfile $tempfileconfig $tempfileconfig.bak 2>/dev/null' INT TERM EXIT
569 cp -f $configfile $tempfileconfig
572 ${DIALOG} --menu "\nSelect category:\n " $height $width $listheight \
574 Protocols
"Network protocols" \
575 Readers
"Readers (CA systems)" \
576 CardReaders
"Card reader drivers" \
581 if [ $opt != 0 ]; then clear; exit; fi
583 menuitem
=$
(cat $tempfile)
585 Add-ons
) menu_addons
;;
586 Protocols
) menu_protocols
;;
587 Readers
) menu_readers
;;
588 CardReaders
) menu_card_readers
;;
599 # Change working directory to the directory where the script is
611 '-g'|
'--gui'|
'--config'|
'--menuconfig')
615 '-s'|
'--show-enabled'|
'--show')
617 list_enabled $
(get_opts
$1)
618 # Take special care of USE_xxx flags
619 if [ "$1" = "card_readers" ]
621 have_flag USE_LIBUSB
&& echo "CARDREADER_SMART"
622 have_flag USE_PCSC
&& echo "CARDREADER_PCSC"
626 '-Z'|
'--show-disabled')
628 list_disabled $
(get_opts
$1)
633 for OPT
in $
(get_opts
$1)
648 all|addons|protocols|readers|card_readers
)
649 enable_opts $
(get_opts
$1)
669 all|addons|protocols|readers|card_readers
)
670 disable_opts $
(get_opts
$1)
682 echo $defconfig |
sed -e 's|# ||g' |
xargs printf "%s\n" |
grep "=y$" |
sed -e 's|^CONFIG_||g;s|=.*||g' |
687 echo $defconfig |
sed -e 's|# ||g' |
xargs printf "%s\n" |
grep "=n$" |
sed -e 's|^CONFIG_||g;s|=.*||g' |
696 enabled
$2 && echo "Y" && exit 0 ||
echo "N" && exit 1
700 disabled
$2 && echo "Y" && exit 0 ||
echo "N" && exit 1
703 '-v'|
'--oscam-version')
704 grep CS_VERSION globals.h | cut
-d\" -f2
707 '-r'|
'--oscam-revision')
708 revision
=`(svnversion -n . 2>/dev/null || printf 0) | sed 's/.*://; s/[^0-9]*$//; s/^$/0/'`
709 if [ "$revision" = "0" ]
711 which git
> /dev
/null
2>&1 && revision
=`git log -10 --pretty=%B | grep git-svn-id | head -n 1 | sed -n -e 's/^.*trunk@\([0-9]*\) .*$/\1/p'`
716 '-O'|
'--detect-osx-sdk-version')
719 for DIR
in /Applications
/Xcode.app
/Contents
/Developer
/Platforms
/MacOSX.platform
/Developer
/SDKs
/MacOSX
{$OSX_VER,10.10,10.9,10.8,10.7}.sdk
/Developer
/SDKs
/MacOSX
{$OSX_VER,10.6,10.5}.sdk
728 echo Cant_find_OSX_SDK
731 '-l'|
'--list-config')
735 '-m'|
'--make-config.mak')
752 echo "[WARN] Unknown parameter: $1" >&2
755 # Some shells complain when there are no more parameters to shift
756 test $# -gt 0 && shift