#! /bin/sh
skip=150
# iMedia package upgrade system
CRCsum=1539379162
MD5=00000000000000000000000000000000
label="iMedia Disk Util"
script=./install
targetdir=mkdisk.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 : mkdisk
Version : 1.0
Arch : i386
Vendor : iMedia Linux
Category : System Tools
Target systems : common
Description : iMedia Disk Util
Details : Format and install a new hard drive device on your system
EOF_LSM
exit 0;
fi
if [ "$1" = "-info" ]; then
echo Identification: $label
echo Target directory: $targetdir
echo Uncompressed size: 108 KB
echo Compression: gzip
echo Date of packaging: Thu Feb 7 16:34:59 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
GZ}xՕIf`F6,,B&R!ĠHIfwdfyGjl2;FiuWuwu]W]v)Zm&Sk#~l֏[7s$<9sϽ{ν ğ)3oxWapApkv\.W(_CDB!1sYZOTΎ49پ:=ԇ"M`c\#3g^]vPw\]E/}, ~(yOzs\.u5o+]8?w"vQ;<,[Q13E TV}Y_$"[L_QZ
XQgAB1{-6*c*^*-}BP.=2jҙ ё%><.[T %;7#>fx+DJ.re_jRO}QIrwɞ*ef`yf44PU[VV*_>GxPPDBD!E(KQTlBQ҆e5J_O6\s
VW
iu:Jayz/Sf
;QF\RACY'([ʷס,QukQrPV6y;ۇ~sJ=Md\(Zx23ӏF?W/~
r%QKx/ß(.Q?!}:kUuF)QrFbQo+aSAFb"ʍn}
(˔O45orŒb<þ^vo::mi*߽:co|:/in_[3o
OT߭ş*|Z|+|Z\dJܤ(g|;TkJnTz>pc
OS]Sjjk
Tj%|(~T
'V)F[
7(Uʾ-߭Tk~y5/*`Z"<: V/+SyB[_Ϥ+tJ+ܕ·YcpL+|GX!_Qx*PJ[|?("D)9_6TSذ]8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