only use clipboard if we have x

This commit is contained in:
Aaron Bieber 2021-03-09 11:25:00 -07:00
parent 12d213f99b
commit 7797df4f30

View File

@ -17,5 +17,9 @@ echo "Syncing..."
openrsync -a --rsync-path=/usr/bin/openrsync \
${HOME}/patches/ suah.dev:/var/www/deftly/patches/
URL="https://deftly.net/patches/${name}.diff"
echo -n "${URL}" | xclip
echo "Copied '${URL}' to clipboard.."
echo ${URL}
if [ ! -z $DISPLAY ]; then
echo -n "${URL}" | xclip
echo "Copied '${URL}' to clipboard.."
fi