Created
October 12, 2017 08:02
-
-
Save yurrriq/6b79e394fe024df83d1b6ef0288067d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
toggle() | |
{ | |
while (($#)); do | |
if [ -f "$1" ]; then | |
set -x | |
chmod $chmod_flags $1 | |
{ set +x; } 2>/dev/null | |
fi | |
shift | |
done | |
} | |
case "$1" in | |
disable) | |
chmod_flags=a-r | |
;; | |
enable) | |
chmod_flags=a+r | |
;; | |
*) | |
echo "Usage: $0 [enable|disable]" | |
exit 1 | |
esac | |
toggle /System/Library/QuickTime/QuickTimeUSBVDCDigitizer.component/Contents/MacOS/QuickTimeUSBVDCDigitizer \ | |
/System/Library/PrivateFrameworks/CoreMediaIOServices{,Private}.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC \ | |
/System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC \ | |
/Library/CoreMediaIO/Plug-Ins/DAL/AppleCamera.plugin/Contents/MacOS/AppleCamera |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment