Skip to content

Instantly share code, notes, and snippets.

@michalvalasek
Created April 12, 2013 13:22
Show Gist options
  • Save michalvalasek/5371955 to your computer and use it in GitHub Desktop.
Save michalvalasek/5371955 to your computer and use it in GitHub Desktop.
#!/bin/bash
COMPONENT="QuickTimeUSBVDCDIgitizer.component"
ORIG="/System/Library/QuickTime"
BACKUP="$ORIG/.iSightBackup"
echo "This action requires admin rights"
if [ ! -d $BACKUP ];
then
sudo mkdir $BACKUP
fi
if [ -d $ORIG/$COMPONENT ];
then
sudo mv $ORIG/$COMPONENT $BACKUP/$COMPONENT
echo "Turning iSight camera OFF"
else
sudo mv $BACKUP/$COMPONENT $ORIG/$COMPONENT
echo "Turning iSight camera ON"
fi
sudo -k #end the elevated status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment