#! /bin/sh skip=150 # iMedia package upgrade system CRCsum=4172621065 MD5=00000000000000000000000000000000 label="MythTV Boot" script=./install targetdir=mythtv-boot.i386-package scriptargs="" keep=n finish=true; xterm_loop=; [ x"$1" = x-xwin ] && { finish="echo Press Return to close this window...; read junk"; xterm_loop=1; shift 1; } if [ x"$1" = "x-help" -o x"$1" = "x--help" ]; then cat << tac 1) Getting help or info about $0 : $0 -help Print this message $0 -info Print embedded info : title, default target directory, embedded script ... $0 -lsm Print embedded lsm entry (or no LSM) $0 -list Print the list of files in the archive $0 -check Checks integrity of the archive 2) Running $0 : $0 [options] [additionnal arguments to embedded script] with following options (in that order) -confirm Ask before running embedded script -keep Do not erase target directory after running embedded script -target NewDirectory Extract in NewDirectory tac exit 0; fi if [ x"$1" = "x-lsm" -o x"$1" = "x--lsm" ]; then cat << EOF_LSM Name : mythtv-boot Version : 0.3 Arch : i386 Vendor : iMedia Linux Category : PVR Applications Target systems : minibox Description : MythTV Boot Details : Starts MythTV at boot time. Includes user setup, sudo rights, XWindows settings and autologin. EOF_LSM exit 0; fi if [ "$1" = "-info" ]; then echo Identification: $label echo Target directory: $targetdir echo Uncompressed size: 76 KB echo Compression: gzip echo Date of packaging: Thu Feb 7 16:39:04 EET 2008 echo script run after extraction: $script $scriptargs [ x"$keep" = xy ] && echo "directory $targetdir is permanent" || echo "$targetdir will be removed after extraction" exit 0; fi if [ "$1" = "-list" ]; then echo Target directory: $targetdir tail -n +$skip $0 | gzip -cd | tar tvf - exit 0; fi if [ "$1" = "-check" ]; then sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` [ $sum1 -ne $CRCsum ] && { echo Error in check sums $sum1 $CRCsum exit 2; } if [ $MD5 != "00000000000000000000000000000000" ]; then # space separated list of directories [ x"$GUESS_MD5_PATH" = "x" ] && GUESS_MD5_PATH="/usr/local/ssl/bin" MD5_PATH="" for a in $GUESS_MD5_PATH; do if which $a/md5 >/dev/null 2>&1 ; then MD5_PATH=$a; fi done if [ -x $MD5_PATH/md5 ]; then md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; [ $md5sum != $MD5 ] && { echo Error in md5 sums $md5sum $MD5 exit 2; } || { echo check sums and md5 sums are ok; exit 0; } fi if [ ! -x $MD5_PATH/md5 ]; then echo an embedded md5 sum of the archive exists but no md5 program was found in $GUESS_MD5_PATH echo if you have md5 on your system, you should try : echo env GUESS_MD5_PATH=\"FirstDirectory SecondDirectory ...\" $0 -check fi else echo check sums are OK ; echo $0 does not contain embedded md5 sum ; fi exit 0; fi [ x"$finish" = x ] && finish=true if [ "$1" = "-confirm" ]; then verbose=y; shift 1; fi if [ "$1" = "-keep" ]; then keep=y; shift 1; fi if [ "$1" = "-target" -a x"$2" != x ]; then targetdir=$2; keep=y;run=n; shift 2; fi if [ "$keep" = y ]; then echo "Creating directory $targetdir"; tmpdir=$targetdir; else tmpdir="/tmp/selfgz$$"; fi location=`pwd` echo=echo; [ -x /usr/ucb/echo ] && echo=/usr/ucb/echo mkdir -p $tmpdir || { $echo 'Cannot create target directory' $tmpdir >&2 $echo 'you should perhaps try option -target OtherDirectory' >&2 eval $finish; exit 1; } $echo -n Verifying archive integrity... sum1=`tail -n +6 $0 | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` [ $sum1 -ne $CRCsum ] && { $echo Error in check sums $sum1 $CRCsum eval $finish; exit 2; } echo OK if [ $MD5 != \"00000000000000000000000000000000\" ]; then # space separated list of directories [ x$GUESS_MD5_PATH = x ] && GUESS_MD5_PATH=\"/usr/local/ssl/bin\" MD5_PATH=\"\" for a in $GUESS_MD5_PATH; do if which $a/md5 >/dev/null 2>&1 ; then MD5_PATH=$a; fi done if [ -x $MD5_PATH/md5 ]; then md5sum=`tail -n +6 $0 | $MD5_PATH/md5`; [ $md5sum != $MD5 ] && { $echo Error in md5 sums $md5sum $MD5 eval $finish; exit 2; } fi fi $echo -n "Uncompressing $label" cd $tmpdir [ "$keep" = y ] || trap 'cd /tmp; /bin/rm -rf $tmpdir; exit $res' EXIT if ( (cd $location; tail -n +$skip $0; ) | gzip -cd | tar xvf - | (while read a; do $echo -n .; done; echo; )) 2> /dev/null; then res=0; if [ x"$script" != x ]; then if [ x"$run" = xn ]; then #$echo "OK to execute: $script $scriptargs $* ? [Y/n] " #read yn echo "Not running autoinstall script"; rm $script #[ x"$yn" = x -o x"$yn" = xy -o x"$yn" = xY ] && { $script $scriptargs $*; res=$?; } else $script $scriptargs $*; res=$? fi [ $res != 0 ] && echo "The program returned an error code ($res)" fi [ "$keep" = y ] || { cd /tmp; /bin/rm -rf $tmpdir; } else echo "Cannot decompress $0"; eval $finish; exit 1 fi eval $finish; exit $res END_OF_STUB G,`ȒGS R a$ߓy8E@ ;o{u4G= u '&%iyMHn\q pUxS 70'M+t˘^H6dIYc4p =I}kedw݀\Fޝڛqb_79lʽbjXmhA=[~R??X+_SۊZߤbpϩYXwܴt-'|\AVB.`3fB St,AL١owҿ9E\+U͢XečKq>mK8ŷ./OݗG.V/sKH<=Teu2َ< a|g)~d+q_`s Ouotm}U* AtMڐ/BnȽguBAN9 {rӵy*svcp64T@|yBEt  N;\Sx/,'^n_%:3UQHbWl5HXp=COn?zzf\[6~ ,EU1b&TbV2t|̄X`~rFMÝ0C0yqME49湳3̸E8y~N&kYCu0)%b𛮁=;7]C^YG$bH1%GL'GFz|?_>@* 3xsٖЏ,kĨ_+r۹E J-γ gcR"*[`AýЫMtlʡTx*Xh7aqLK %&95L1 QMqfxmh 6FVG֏3D0{x% !飷Rj\xR|k/l%秧qzj:m[e#zT2@.6#j2)g-zNƸbQN VY.?WoͩwULr9E41`;px9!d?,mYKWabG8ljw̥ǻPʞ ,+Ž4G»' Vba۲3ٻ&K&3ለviUzEWM";7ZBFlǮCWR@Wz]}G" hu}D|YڋK+TU/֪ pud]TuU}j .ZZ-zS5p PUo>|T̡*k*XE[2/j;Z5YbPתp#P¬ϒV^AZ JV3W+k:V-D6hzZ$M4Bq\+_]6ѥU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