Last active
August 29, 2015 14:17
-
-
Save chiita/60beca99fc1398f5fd46 to your computer and use it in GitHub Desktop.
change directory of snapshot For Mac
This file contains 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
#!/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