Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Created October 12, 2012 15:45
Show Gist options
  • Save mattintosh4/3879875 to your computer and use it in GitHub Desktop.
Save mattintosh4/3879875 to your computer and use it in GitHub Desktop.
シェルスクリプトサンプル
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
case "$(defaults read com.apple.finder AppleShowAllFiles)" in
0) defaults write com.apple.finder AppleShowAllFiles -bool YES;;
1) defaults write com.apple.finder AppleShowAllFiles -bool NO;;
esac
killall Finder
. "${HOME}"/.bashrc
for f in "$@"
do
wine "$f" &
done
for f in "$@"
do
/opt/X11/bin/xterm -e bash -c ". ${HOME}/.bashrc; wine \"$f\"" &
done
/opt/local/bin/7z a -mx=0 "$1.zip" "$@" -xr\!.DS_Store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment