91 fi |
91 fi |
92 done |
92 done |
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 dd if=$l_me bs=8192 skip=8 2>/dev/null |
96 dd if=$l_me bs=8192 skip=10 2>/dev/null |
97 exit 0 |
97 exit 0 |
98 fi |
98 fi |
99 |
99 |
100 # display version and copyright header |
100 # display version and copyright header |
101 echo "OpenPKG ${l_release} Source Bootstrap Package, version ${l_version}" |
101 echo "OpenPKG ${l_release} Source Bootstrap Package, version ${l_version}" |
122 |
122 |
123 # extract the source distribution files |
123 # extract the source distribution files |
124 echo "++ extracting OpenPKG source distribution" |
124 echo "++ extracting OpenPKG source distribution" |
125 rm -rf $l_dir >/dev/null 2>&1 |
125 rm -rf $l_dir >/dev/null 2>&1 |
126 mkdir $l_dir || exit 1 |
126 mkdir $l_dir || exit 1 |
127 dd if=$l_me bs=8192 skip=8 2>/dev/null | (cd $l_dir; tar xf - 2>/dev/null) |
127 dd if=$l_me bs=8192 skip=10 2>/dev/null | (cd $l_dir; tar xf - 2>/dev/null) |
128 if [ ".$cusr" = .root ]; then |
128 if [ ".$cusr" = .root ]; then |
129 ( cd $l_dir || exit 1 |
129 ( cd $l_dir || exit 1 |
130 chown -R -h $cusr . >/dev/null 2>&1 || true |
130 chown -R -h $cusr . >/dev/null 2>&1 || true |
131 chgrp -R -h $cgrp . >/dev/null 2>&1 || true |
131 chgrp -R -h $cgrp . >/dev/null 2>&1 || true |
132 ) || exit 1 |
132 ) || exit 1 |
149 # that we carry megabytes of data with us... |
149 # that we carry megabytes of data with us... |
150 exit 0 |
150 exit 0 |
151 |
151 |
152 # the distribution tarball is appended in raw format directly to the |
152 # the distribution tarball is appended in raw format directly to the |
153 # end of this script, just leaded by padding whitespaces which make |
153 # end of this script, just leaded by padding whitespaces which make |
154 # sure that the tarball data starts at the predefined offset of 64KB. |
154 # sure that the tarball data starts at the predefined offset of 80KB. |
155 # This allows us to unpack the tarball by just skipping the leading |
155 # This allows us to unpack the tarball by just skipping the leading |
156 # 64KB (= 8192*8, see above). |
156 # 80KB (= 8192*10, see above). |
157 |
157 |