Skip to content

Instantly share code, notes, and snippets.

@chiita
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiita/60beca99fc1398f5fd46 to your computer and use it in GitHub Desktop.
Save chiita/60beca99fc1398f5fd46 to your computer and use it in GitHub Desktop.
change directory of snapshot For Mac
#!/bin/bash
echo "保存したいディレクトリ名を指定してください。"
read basho
mkdir -pv /Users/chiita/GoogleDrive/12_ScreenShot/mac/$basho
if [ $? -eq 0 ]; then
echo "[ 下記ディレクトリの作成に成功しました。]"
echo "### /Users/chiita/GoogleDrive/12_ScreenShot/mac/$basho ###\n"
defaults write com.apple.screencapture location "/Users/chiita/GoogleDrive/12_ScreenShot/mac/$basho"
if [ $? -eq 0 ]; then
echo "[ スクリーンショットの保存先を変更しました。]\n"
fi
killall SystemUIServer
if [ $? -eq 0 ]; then
echo "[ SystemUIServerプロセスをKILL、再起動しました。]\n"
echo "#### スクリーンショットの保存先変更は完了しました。 ####"
echo "#### 終了します。 ####"
fi
else
echo "mkdir is failed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment