This isn't a really easy thing to do, but given fixed paths, you could do something like:
Code:
#! /bin/sh
if [ -a /Volumes/A/System/Library/CoreServices/BootX ]; then
UCHGSET=$(ls -lo /Volumes/A/System/Library/CoreServices/BootX | grep -vqF uchg; echo $?);
chflags nouchg /Volumes/A/System/Library/CoreServices/BootX;
bless -folder /Volumes/A/System/Library/CoreServices -save9 -label A -setBoot;
if [ $UCHGSET -eq 1 ]; then
chflags uchg /Volumes/A/System/Library/CoreServices/BootX;
fi;
echo "Successfully set A as startup disk";
else
echo "Could not set A as the startup disk because it does not contain a valid Mac OS X System Folder.";
exit 1;
fi
nohup /bin/bash -c "sleep 10; /Applications/SuperDuper!.app/Contents/Resources/Scripts/restart.scpt"&