Skip to content

Instantly share code, notes, and snippets.

@jonyesno
Created September 21, 2010 09:56
Show Gist options
  • Save jonyesno/589485 to your computer and use it in GitHub Desktop.
Save jonyesno/589485 to your computer and use it in GitHub Desktop.
#!/bin/sh
CFS="key zomo"
for C in ${CFS} ; do
DMG=${HOME}/cfs/${C}.dmg
if [ ! -f ${DMG} ] ; then
echo no ${DMG} for ${C}
next
fi
if mount | grep -q /Volumes/${C} ; then
echo ${C} already mounted
else
hdiutil attach ${DMG}
mount -u -onoatime,noowners /Volumes/${C}
echo ${C} mounted
fi
mount | grep /Volumes/${C}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment