File modified: bin/start.sh
Change310 at Sun May 23 19:22:24 2010 +0200 by Ivan Kanis <ivan@mac.foo>
diff -r d2110d75e4a8 -r 1f0608dab258 bin/start.sh --- a/bin/start.sh Sun May 23 18:32:55 2010 +0200 +++ b/bin/start.sh Sun May 23 19:22:24 2010 +0200 @@ -1,6 +1,13 @@ #!/bin/sh -portable_dir=/media/Iomega_HDD +hd_name="Iomega_HDD" + +if test "X`uname`" == "XDarwin" +then + portable_dir="/Volumes/${hd_name}" +else + portable_dir="/media/${hd_name}" +fi check () { if test $? -ne 0 @@ -10,16 +17,23 @@ fi } -ALSA_FILE=${HOME}/local/alsa.cnf -if test -f ${ALSA_FILE} +ALSA_FILE="${HOME}/local/alsa.cnf" +if test -f "${ALSA_FILE}" then - sudo alsactl -f ${ALSA_FILE} restore + sudo alsactl -f "${ALSA_FILE}" restore fi -if test ! -d ${portable_dir}/keep +if test "X`uname`" == "XDarwin" then - sudo mount ${portable_dir} - check "error mounting ${portable_dir}" + sudo umount "${portable_dir}" + hd_device=`diskutil list | grep "${hd_name}" | awk '{printf $6}'` + sudo ntfs-3g "/dev/${hd_device}" "${portable_dir}" +else + if test ! -d "${portable_dir}/keep" + then + sudo mount "${portable_dir}" + check "error mounting ${portable_dir}" + fi fi cd ${HOME}/hg hg pull ${portable_dir}/keep/hg