Created
January 23, 2012 04:31
-
-
Save nikuuchi/1660592 to your computer and use it in GitHub Desktop.
Emacsのデーモンを立ち上げる時に、既にデーモンが立ち上がっているときに早めに検出して無駄に立ち上げる時間を省く。
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 | |
| num=`ps aux|grep emacs\ -nw\ --daemon|wc -l` | |
| if [ $num = 1 ] | |
| then | |
| TERM=xterm-256color emacs -nw --daemon | |
| else | |
| echo 'Emacs is already running.' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment