Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. # Search for cask, select & install
  2. ## 0.1 Inlife
  3. function caskdo {
  4. echo 'Searching...';
  5. OPTIONS=($(brew cask search $1 | sed 1,2d));
  6.  
  7. if [ -z "$OPTIONS" ]; then
  8. echo "Not found anything like \"$1\""
  9. else
  10. echo 'Select number of cask you want to install: '
  11. select RESULT in $OPTIONS;
  12. do
  13. echo "Installing $RESULT";
  14. brew cask install $RESULT;
  15. echo "Done.";
  16. exit;
  17. done
  18. fi
  19. }
  20.  
  21.  
  22. # Example
  23. caskdo google
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement