Last active
April 3, 2016 17:36
-
-
Save miao1007/54a2bdb012c643e9f826 to your computer and use it in GitHub Desktop.
download himawari8 wallpaper for mac
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
#!/bin/sh | |
#delay 30 minute | |
delay=-v-30M | |
#image location | |
location=$HOME/Pictures/himawari8 | |
date=$(date -u $delay "+%Y/%m/%d") | |
file_name=$(date -u $delay "+%H")$(echo "($(date -u $delay "+%M"))/10 * 10" | bc)"00_0_0.png" | |
url=http://himawari8-dl.nict.go.jp/himawari8/img/D531106/1d/550/$date/$file_name | |
mkdir -p $location | |
cd $location | |
#Override download | |
curl $url > $file_name | |
img_path=$location/$file_name | |
osascript <<EOF | |
tell application "Finder" to set desktop picture to POSIX file "$img_path" | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment