#!/usr/bin/env bash

DIR=$(dirname $(mktemp -u))"/realsync";

printf "\e[92mWorking directory: \e[96m${PWD}\e[92m\n\n" \
    && perl ${DIR}/realsync $PWD >&1 2>/dev/null \
    || printf "Downloading RealSync..\n\n" \
    && git clone https://github.com/Zebradil/dklab_realsync.git ${DIR} >/dev/null 2>&1 \
    && perl ${DIR}/realsync $PWD >&1 2>/dev/null \
    || rm -rf ${DIR} \
    && printf "\n\nAll clear\n\e[96mGoodbye!!";
