93 |
93 |
94 # optionally extract the embedded tarball only |
94 # optionally extract the embedded tarball only |
95 if [ ".$o_tar" = .yes ]; then |
95 if [ ".$o_tar" = .yes ]; then |
96 tmpdir="${TMPDIR-/tmp}/openpkg.$$" |
96 tmpdir="${TMPDIR-/tmp}/openpkg.$$" |
97 ( umask 077 && mkdir $tmpdir) || exit 1 |
97 ( umask 077 && mkdir $tmpdir) || exit 1 |
98 dd if=$l_me bs=8192 skip=8 2>/dev/null |\ |
98 dd if=$l_me bs=8192 skip=10 2>/dev/null |\ |
99 ( cd $tmpdir || exit 1 |
99 ( cd $tmpdir || exit 1 |
100 tar xf - 2>/dev/null || exit 1 |
100 tar xf - 2>/dev/null || exit 1 |
101 ./openpkg.bzip2 -d -c openpkg.tar.bz2 |
101 ./openpkg.bzip2 -d -c openpkg.tar.bz2 |
102 ) || exit 1 |
102 ) || exit 1 |
103 rm -rf $tmpdir |
103 rm -rf $tmpdir |
164 ) || exit 1 |
164 ) || exit 1 |
165 fi |
165 fi |
166 |
166 |
167 # extract and install binary distribution files |
167 # extract and install binary distribution files |
168 echo "++ extracting OpenPKG binary distribution" |
168 echo "++ extracting OpenPKG binary distribution" |
169 dd if=$l_me bs=8192 skip=8 2>/dev/null |\ |
169 dd if=$l_me bs=8192 skip=10 2>/dev/null |\ |
170 (cd $l_prefix; tar xf - 2>/dev/null) |
170 (cd $l_prefix; tar xf - 2>/dev/null) |
171 echo "++ installing OpenPKG binary distribution" |
171 echo "++ installing OpenPKG binary distribution" |
172 ( cd $l_prefix || exit 1 |
172 ( cd $l_prefix || exit 1 |
173 ./openpkg.bzip2 -d -c openpkg.tar.bz2 | ./openpkg.tar xf - 2>/dev/null |
173 ./openpkg.bzip2 -d -c openpkg.tar.bz2 | ./openpkg.tar xf - 2>/dev/null |
174 rm -f openpkg.tar openpkg.bzip2 openpkg.tar.bz2 >/dev/null 2>&1 || true |
174 rm -f openpkg.tar openpkg.bzip2 openpkg.tar.bz2 >/dev/null 2>&1 || true |
259 # that we carry megabytes of data with us... ;-) |
259 # that we carry megabytes of data with us... ;-) |
260 exit 0 |
260 exit 0 |
261 |
261 |
262 # the distribution tarball is appended in raw format directly to the |
262 # the distribution tarball is appended in raw format directly to the |
263 # end of this script, just leaded by padding whitespaces which make |
263 # end of this script, just leaded by padding whitespaces which make |
264 # sure that the tarball data starts at the predefined offset of 64KB. |
264 # sure that the tarball data starts at the predefined offset of 80KB. |
265 # This allows us to unpack the tarball by just skipping the leading |
265 # This allows us to unpack the tarball by just skipping the leading |
266 # 64KB (= 8192*8, see above). |
266 # 80KB (= 8192*10, see above). |
267 |
267 |