Created
December 15, 2015 16:56
-
-
Save marcotrosi/89f535a0052f8e3c8454 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
#!/bin/bash | |
# save tool paths in variables | |
CocoaDialog='/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog' | |
YoutubeDL='/usr/local/bin/youtube-dl' | |
# get clipboard content | |
Clipboard=$(pbpaste) | |
# run youtube-dl | |
$YoutubeDL -o "/Users/${USER}/Downloads/%(title)s.%(ext)s" $Clipboard | |
# create info bubble | |
if [ $? -eq 0 ]; then | |
$CocoaDialog bubble --timeout 3 --title "YoutubeDL" --text "Download Successful"; | |
else | |
$CocoaDialog bubble --timeout 3 --title "YoutubeDL" --text "Download Failed"; | |
fi | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment