Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。
- 製作者: mattintosh
- ブログ: http://mattintosh.blog.so-net.ne.jp
.webkit-line-gutter-backdrop + table{ | |
background-color:rgb(25,25,25); | |
font-size:12px; | |
line-height:1.5 | |
} | |
.webkit-line-gutter-backdrop + table .webkit-line-content{ | |
color:rgb(255,255,255); | |
font-family:"dejavu sans mono",monospace; | |
white-space:pre | |
} |
mkdir build-32 && cd build-32 && ABI=32 \ | |
../configure \ | |
--prefix=/usr/local/tools/gmp/5.0.5/i386 \ | |
--enable-cxx && make -j4 && make check && make install && cd ../ && mkdir build-64 && cd build-64 && ABI=64 \ | |
../configure \ | |
--prefix=/usr/local/tools/gmp/5.0.5/x86_64 \ | |
--enable-cxx && make -j4 && make check && make install |
case "$(defaults read com.apple.finder CreateDesktop)" in | |
0) defaults write com.apple.finder CreateDesktop -bool YES;; | |
1) defaults write com.apple.finder CreateDesktop -bool NO;; | |
esac | |
killall Finder |
# -------------------------------------- | |
# Google search from terminal | |
# -------------------------------------- | |
ggr(){ | |
_gU="$(echo $* | sed -e 's/^-[a-z] //' -e 's/ /+/g')" | |
_gU="https://www.google.co.jp/#hl=ja&safe=off&output=search&sclient=psy-ab&q=${_gU}&oq=${_gU}" | |
case $1 in | |
-c) _gA="/Applications/Google Chrome.app";; | |
-f) _gA="/Applications/Firefox.app";; |
Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。
#!/bin/bash | |
# | |
# OSXShellScriptAppBuilder (C) 2012 mattintosh4 | |
# | |
# Usage: | |
# bash <(curl https://raw.github.com/mattintosh4/OSXShellScriptAppBuilder/master/OSXShellScriptAppBuilder.sh) "module-name" | |
cat <<__EOF__ | |
================================================================ |
-- | |
-- Winetricks.app - Winetricks GUI | |
-- Created by mattintosh4 on 2013-04-09. | |
-- Copyright (c) 2013 mattintosh4, https://github.com/mattintosh4/iNSTANTWiNE | |
-- | |
-- user edit area | |
property PREFIX : "/usr/local/bin" | |
property WINEPREFIX : "$HOME/.wine" |
property ffplay : "/usr/local/bin/ffplay" | |
on main(input) | |
do shell script ffplay & space & quoted form of input | |
end main | |
on open argv | |
repeat with aFile in argv | |
main(POSIX path of aFile) | |
end repeat |
#!/bin/bash | |
# | |
# OS X Wine.app creator | |
# Copyright (c) 2013 mattintosh4, http://mattintosh.hatenablog.com | |
# | |
# usage: | |
# bash wine_application_bundle_creator.sh /opt/local/bin/wine | |
# | |
test -x "$1" || { echo "WINELOADER is not found. Please set argument to WINELOADER path."; exit; } |