#! /bin/sh skip=150 # iMedia package upgrade system CRCsum=3690380526 MD5=00000000000000000000000000000000 label="iMedia Linux package maker" script=./install targetdir=imedia-pkg-maker.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 : imedia-pkg-maker Version : 6.0 Arch : i386 Vendor : iMedia Linux Category : Development Target systems : minibox Description : iMedia Linux package maker Details : iMedia Linux package make environment EOF_LSM exit 0; fi if [ "$1" = "-info" ]; then echo Identification: $label echo Target directory: $targetdir echo Uncompressed size: 120 KB echo Compression: gzip echo Date of packaging: Thu Feb 7 16:41:25 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=isF*6IJl'$̥[*K&1$x.J˒%'T ΘZƃ/ٚ._83;3ͦ|wQl /ws>Xd|ou{qow2vN٭?f~l܃w; sќ_f#7I;EYM5m^pSΙo\plwЁyx(?rM]vLmm&,X+nyF`y\!Т,dX$_Xᜡn6N=4u5i(φY%VxnY'/B{:I+ CL\BL#Yf~l^4Կ'7 &!cX'8b=-m{4gapJ6B-Z1,"q.E֌o?#yDԉg~ ]fǎB}kؐۚ= *`[qil^IYQJ石)vNXX6!gAT48Ha?r !Qs ^F3[~]ӬpI\h40 ƚS04>9+jf~YV1 }wvK@WV-*UjJvjv1p⿪w_k%տ,> +^s11 Ah g+,ť\1pM Q^'Ch N:Z..o/@ g+}int>g;}a%?F}ncǻWվpg)٭NgH*}нsf]QI+l}%s_D[|z>Ӯ>^zk]VmY=_'_P {2`2۽b>xW^-W6p(66+rғ#Ov>d|k׿P6#tgQ|3Mm>c{j%O۟ZV!vۭe}Qѧw?ob'#u@w絞&V;?{/7[^;=mYm.>l ;  ̬cYXv<IKɀLjYĖ08{XVg0tetOj|? Tj KPX Yj@!tfj/xYBh^;)p۹}F ӻ>REPȐCxGV8^DT轮 r P! .AY2J- <]ZB!YļIb`+RI 0ؔ@ E$Jٸjz+,PߟD/RH+i`-bC̎bF :nč6Ds #0<˘=Վ#ܩcM]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