#!/bin/bash
#---------------------------------------------
# Copyright (c) 2009 bitSplit(tm) Enterprises
#---------------------------------------------

BSE="/private/var/mobile/Media/bSE"
DCIM=" /private/var/mobile/Media/DCIM/999APPLE"

rm -Rf /usr/sbin/_bSE_OK5.txt
rm -Rf $BSE/sdResult.txt

if ( test -e $BSE/sdTrigger.txt )
then
	rm -Rf $BSE/sdTrigger.txt

	if ( test -e $BSE/sdDelay.txt )
	then
		sleep 1
		_bSE_play /System/Library/Audio/UISounds/long_low_short_high.caf
		sleep 1
		_bSE_play /System/Library/Audio/UISounds/long_low_short_high.caf
		sleep 1
		_bSE_play /System/Library/Audio/UISounds/long_low_short_high.caf
		sleep 1
		_bSE_play /System/Library/Audio/UISounds/long_low_short_high.caf
		sleep 1
		_bSE_play /System/Library/Audio/UISounds/long_low_short_high.caf
	fi

	rm -Rf $BSE/sdDelay.txt

	ls -l $DCIM/ >> $BSE/sdResult.txt
	login -f mobile < $BSE/login.txt
	ls -l $DCIM/ >> $BSE/sdResult.txt
	date > /usr/sbin/_bSE_OK5.txt
fi

logout
