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