#!/bin/sh

######################
## SYSTEM VARIABLES ##
######################

## Released under the GNU General Public License (version 2 or above)

## Any lines in this file preceeded by a hash ('#') indicates a comment, and is not read by the interpreter.

# This file is automatically generated by the SRB2Wii compiler. It is not designed to be modified by the user in a compiled binary.

# Set PATH environment variable.
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
# Home folder of the user.
HOME="/mnt/sd/srb2wii"
# Directories ld looks for shared libraries in.
LD_LIBRARY_PATH="/lib:/usr/lib"
# Export these variables as environment variables.
export HOME PATH LD_LIBRARY_PATH
# Name of the package.
OSNAME="srb2wii"
# Large name of the package.
OSLNAME="SRB2Wii"
# Full name of the package.
OSLLNAME="Sonic Robo Blast 2 for the Wii"
# Creator of the package.
OWNER="Callum Dickinson <gcfreak_ag20@hotmail.com>"
# Contributor to the package.
CONTRIBUTOR="Sonic Team Junior <www.srb2.org>"
# Version of the package.
SYSVER="2.0.0"
# Revision of the package.
SYSREV="6109"
# Date the package was build (short).
SYSMINIBLDDATE="11/27/10"
# Date the package was built (long).
SYSBLDDATE="Sat Nov 27 10:33:18 NZDT 2010"
# Folder for programs to log to.
LOGDIR="/mnt/sd/srb2wii/log"
# File size of the main filesystem.
FILE_SIZE="32"
# Block size of images.
BLOCK_SIZE="1M"
# Above block size in KB.
BLOCK_SIZE_2="1024"
# File size of standard swap.
FILE_SIZE_SWAP="32"
# File size of extended swap.
FILE_SIZE_SWAP_2="128"
# Mount points.
SDCARD="/mnt/sd"
IMGDIR="/mnt/img"
USBMOUNT="/mnt/usb"
# Full information about the package (shorter version).
MINIFULLOS="$OSLNAME v$SYSVER (r$SYSREV, built $SYSMINIBLDDATE)"
# Full information about the package (absoutely full).
FULLOS="$OSLLNAME v$SYSVER (rev $SYSREV, built $SYSBLDDATE)"
# This is for logging, to use something that is not $0 so the logging can be started correctly.
ME="`basename $0`"
OLDLOGCOMPAT=""
DEBUG=`cat $HOME/linux.conf 2> /dev/null | grep Debug | sed -ne "s/.*Debug=\([^ ]*\).*/\1/p"`
# System configuration file
SYSCONF="$HOME/linux.conf"
# Am I running under IOS or mini?
LOADER=`cat /proc/cmdline 2> /dev/null | sed -ne "s/.*loader=\([^ ]*\).*/\1/p"`
case $LOADER in
	ios) DIR="apps"
		BLKDEV="rvlsda1"
		BLKDEVO="rvlsda"
		;;
	mini) DIR="bootmii"
		BLKDEV="mmcblk0p1"
		BLKDEVO="mmcblk0"
		;;
esac
USBDEV="sda1"
USBDEVO="sda"
MOUNT="SD card"
# As this script gets used to load all variables in every script, use it to load all functions too,
# so we only need to only load this file when loading all the stuff necessary for the scripts to _work_.
. /etc/functions
# If /etc/.usbdisk exists, load it. This will tell the system we are running from a USB stick.
[ -f /etc/.usbdisk ] && . /etc/.usbdisk
