[Nook Color Android Development] AdamOutler:
I tried to run the bootstrap but for some reason it had not extracted the /data/botbrew tar.gz or the control tar.gz

I think I fixed it..

#! /system/bin/sh
export TARGET=/data
PREFIX=/botbrew
BUSYBOX="${TARGET}${PREFIX}/bin/busybox"
CACHEDIR="/data/data/com.inportb.botbrew/cache/bootstrap"
root_rw() {
"${BUSYBOX}" mount -o remount,rw /
}
root_ro() {
"${BUSYBOX}" mount -o remount,ro /
}
botbrew_clean() {
root_rw
"${BUSYBOX}" umount -l /botbrew/run > /dev/null 2>&1 || true
"${BUSYBOX}" umount -l /botbrew > /dev/null 2>&1 || true
"${BUSYBOX}" rm -rf /botbrew > /dev/null 2>&1 || true
root_ro
}
botbrew_link() {
if ! [ -e "${PREFIX}" ]; then
root_rw
ln -s "${TARGET}${PREFIX}" "${PREFIX}" || true
root_ro
fi
}
botbrew_unlink() {
if [ -L "${PREFIX}" ]; then
root_rw
rm "${PREFIX}" || true
root_ro
fi
}
botbrew_clobber() {
if [ -e /system/lib/opkg/info ]; then
echo
echo "Removing your old BotBrew setup:"
"${BUSYBOX}" mount -o remount,rw /system
echo "Running prerm scripts..."
for item in /system/lib/opkg/info/*.prerm; do
"${item}" remove || true
done
echo "Running postrm scripts..."
for item in /system/lib/opkg/info/*.postrm; do
"${item}" remove || true
done
echo "Removing files..."
for item in `cat /system/lib/opkg/info/*.list`; do
case "${item}" in
*/);;
*)
if [ -e "${item}" ]; then
rm "${item}" || true
fi
;;
esac
done
echo "Removing directories..."
for item in `cat /system/lib/opkg/info/*.list`; do
case "${item}" in
*/)
if [ -e "${item}" ]; then
rmdir "${item}" || true
fi
;;
esac
done
echo "Wrapping up..."
rm -r /data/vtmp || true
rm -r /system/libexec || true
rm -r /system/etc/opkg || true
rm -r /system/lib/opkg || true
rm -r /system/share || true
echo "Done; moving on!"
fi
}
echo
echo Temporarily installing busybox...
mkdir "${TARGET}${PREFIX}" || true
mkdir "${TARGET}${PREFIX}/bin" || true
mkdir "${TARGET}${PREFIX}/lib" || true
cp "${CACHEDIR}/busybox" "${BUSYBOX}"
cp "${CACHEDIR}/libbusybox.so.1.19.4" "${TARGET}${PREFIX}/lib/libbusybox.so.1.19.4"
chmod 0755 "${BUSYBOX}"
export PATH="${TARGET}${PREFIX}/bin:${TARGET}${PREFIX}/libexec/busybox:${PATH}"
export LD_LIBRARY_PATH="${TARGET}${PREFIX}/lib:${LD_LIBRARY_PATH}"
"${BUSYBOX}" mkdir -p "${TARGET}${PREFIX}/libexec/busybox"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/chmod"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/cp"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/grep"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/mkdir"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/mv"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/rm"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/rmdir"
"${BUSYBOX}" ln -s "${BUSYBOX}" "${TARGET}${PREFIX}/libexec/busybox/tar"
echo
echo Unpacking...
"${BUSYBOX}" mkdir -p "${TARGET}${PREFIX}/tmp" "${TARGET}${PREFIX}/run/tmp" "${TARGET}${PREFIX}/var/tmp/opkg/tmp"
cd "${TARGET}${PREFIX}/var/tmp/opkg/tmp"
botbrew_clobber
botbrew_clean
"${BUSYBOX}" tar -zxf "${CACHEDIR}/control.tar.gz"
cat control
echo
echo Installing...
botbrew_link
if [ -f preinst ]; then ./preinst bootstrap; fi
"${BUSYBOX}" tar -zxvf "${CACHEDIR}/data.tar.gz"
if [ $? -gt 0 ]; then
echo
echo 'ERROR: BotBrew was unable to extract the bootstrap package. Please report this problem.'
exit 1
fi
"${BUSYBOX}" cp -a ".${PREFIX}" "${TARGET}/"
echo
echo Configuring...
if [ -f postinst ]; then ./postinst bootstrap; fi
echo
echo Finishing...
"${BUSYBOX}" rm -rf * "${CACHEDIR}/control.tar.gz" "${CACHEDIR}/data.tar.gz" "${TARGET}${PREFIX}/var/tmp/opkg/archives/"*
opkg update
if [ $? -gt 0 ]; then
echo
echo 'WARNING: BotBrew was not able to update its package cache over the Internet. For normal operation, BotBrew needs superuser privileges, as well as the ability to download feeds and packages over the Internet.'
echo
echo 'To complete the setup, please make sure that BotBrew has superuser privileges and we are connected to the Internet, and then tap the refresh button and install the package:'
echo '	botbrew-core'
echo
echo 'To do this using the command line, run as superuser:'
echo '	opkg update'
echo '	opkg install botbrew-core'
botbrew_unlink
exit 1
fi
opkg install botbrew-core
if [ $? -gt 0 ]; then
echo
echo 'WARNING: BotBrew was not able to install core packages. For normal operation, BotBrew needs superuser privileges, as well as the ability to download feeds and packages over the Internet.'
echo
echo 'To complete the setup, please make sure that BotBrew has superuser privileges and we are connected to the Internet, and then tap the refresh button and install the package:'
echo '	botbrew-core'
echo
echo 'To do this using the command line, run as superuser:'
echo '	opkg update'
echo '	opkg install botbrew-core'
botbrew_unlink
exit 1
fi
botbrew_unlink
"${TARGET}${PREFIX}/init.sh"

The two lines I added were:

#! /system/bin/sh

CACHEDIR="/data/data/com.inportb.botbrew/cache/bootstrap"

It collected some errors though..

* extract_archive: Cannot create symlink from ./system/bin/botbrew to '/data/botbrew/bin/botbrew': Read-only file system.
* extract_archive: Cannot create symlink from ./system/bin/bbsh to '/data/botbrew/bin/bbsh': Read-only file system.
* extract_archive: Cannot create symlink from ./system/bin/ldimport to '/data/botbrew/bin/ldimport': Read-only file system.
* extract_archive: Cannot create symlink from ./system/lib/libbusybox.so.1.19.4 to '/botbrew/lib/libbusybox.so.1.19.4': Read-only file system.
* opkg_conf_deinit: Couldn't unlink /botbrew/tmp/opkg.lock: No such file or directory.