]" 2>&1
echo " [-h|--help] [-v|--verbose]" 2>&1
exit 1
fi
# determine current user/group
cusr=`(id -un) 2>/dev/null ||\
(id | sed -e 's;^[^(]*(\([^)]*\)).*;\1;') 2>/dev/null ||\
(whoami) 2>/dev/null ||\
(who am i | cut "-d " -f1) 2>/dev/null ||\
echo $LOGNAME`
cgid=`(id -g $cusr) 2>/dev/null ||\
((getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null |\
grep "^${cusr}:" | sed -n -e '1p' | awk -F: '{ print $4; }')`
cgrp=`(id -gn $cusr) 2>/dev/null ||\
((getent group; cat /etc/group; ypcat group) 2>/dev/null |\
grep ":${cgid}:" | sed -n -e '1p' | awk -F: '{ print $1; }')`
if [ ".$cgrp" = . ]; then
cgrp="$cusr"
fi
# extract the tarball
echo "$me: extracting to $dir..."
uudecode $me
rm -rf $dir >/dev/null 2>&1
mkdir $dir || exit 1
cat $tgz | (cd $dir; tar x${v}f - 2>/dev/null)
if [ ".$cusr" = .root ]; then
( cd $dir
chown -R -h $cusr . >/dev/null 2>&1 || true
chgrp -R -h $cgrp . >/dev/null 2>&1 || true
)
fi
echo "$me: extraction done."
# perform bootstrap procedure
echo "$me: building for $prefix..."
cd $dir || exit 1
/bin/sh ./openpkg.boot "$@" || exit 1
echo "$me: building done."
# cleanup
echo "$me: cleaning up..."
cd ..
rm -rf $dir >/dev/null 2>&1
rm -f $tgz >/dev/null 2>&1
echo "$me: cleaned up."
# die explicitly just before the shell would discover
# that we carry mega-bytes of data with us...
exit 0
# the distribution tarball
begin 644 openpkg-20030606-20030606.src.tar.Z
M2$E35$]260``````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````#`Q,#`V-#0`,#`R,S0R,``P,#`P,#`P`#`P,#`P,#$P,C`R
M`#`W-C2]H96%D97(@=&\@<&%C:V%G92!B96-A=7-E(&ET(&ES(')E9F5R96YC
M97,@8GD@;&EB2`G=7-E7SQT;V]L
M;F%M93XG(&EN2!S971T:6YG"!D978@=&EC:V5T(#(S(&)Y(&9I;F%L;'D@:6UP;&5M96YT:6YG('MM
M+'(L;BQS?75I9"!A;F0@>VTL"!E"!S=6)S
M=&ET=71I;VX@;V8@;F]R97!L86-E(&%T=')I8G5T90HR,#`S,#,P-2!M96=A
M+6-O;6UI=#H@"`G9V5T96YT)R!B87-E
M9"!S=7!P;W)T(&9OF4@4$]325@@:60*,C`P
M,S`R,3$@06%A86%N;FYD(')I2!T;R!F:7@@
M=&5M<&]R87)Y(&9I;&5N86UE(&ES"!T>7!O"C(P,#,P,3$T('5P9W)A
M9&4@=&\@8U523"`W+C$P+C,*,C`P,S`Q,3,@;6%K92!S=7)E('=E('-T;W`@
M;VX@97)R;W)S"C(P,#,P,3$P('-O;64@=F5N9&]R('1A7-T96T*,C`P,S`Q,#D@
M861D($9R965"4T0@-2XP+4-54E)%3E0@'1E;G-I;VYS.B`E;W!T:6]N
M(&%N9"`E;W!T:6]N2!F:7@@=&AE(&UK9&ER
M(&ES`HR,#`R,3$R-R!A;F0@86QS;R!T:&4@8FEG9V5R(&AA;6UE2!P86-K86=E"C(P,#(Q,3$Y('5P9W)A
M9&4@=&\@8U523"`W+C$P+C(@*')E<75I2!T;R!F:7@@8U523"!B=6EL9&EN9PHR,#`R,3`Q,2!U<&=R861E('1O(&-5
M4DP@-RXQ,"XQ"C(P,#(Q,#`Y(&9I>"!U;G!A8VMI;F<*,C`P,C$P,#4@=7!G
MFEP(#$N,RXT"C(P,#(P.3`Y($9I>&5D(&$@
M"!F;W(@;6]R92!M
M;V1E2!T
M;R`D4$%42`HN+BX*"@``````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!214%$344`````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M,#$P,#8T-``P,#(S-#(P`#`P,#`P,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