all repos — dotfiles @ 29de1fd80d29723d89705743364e4a20863f70e8

linux dotfiles

bin/scripts/get-ep-walls (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
#!/bin/sh
epdir="$HOME/pictures/ep"
if [ -d $epdir ]
then
    cd "$epdir"
    wget -O - --quiet reddit.com/r/earthporn.json cat earthporn.json |\
        jq '.data.children[] .data.url' | tr -d '"' | grep -E "jpg|png$" |\
        xargs wget
else
    printf "$epdir doesn't exist\n"
    exit
fi