#!/usr/bin/env sh SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") URL=$($SCRIPTPATH/reddit-wp.sh) NAME=$(basename "$URL") FILENAME=~/pictures/wallpapers/"$NAME" wget "$URL" -nc -O "$FILENAME" sleep 1 $SCRIPTPATH/set-bg.sh $FILENAME