Skip to content

Instantly share code, notes, and snippets.

@gbougakov
Created August 29, 2018 09:28
Show Gist options
  • Save gbougakov/f55928d94b01a1e879fb39713deebad5 to your computer and use it in GitHub Desktop.
Save gbougakov/f55928d94b01a1e879fb39713deebad5 to your computer and use it in GitHub Desktop.
Timer Cloner
#!/bin/sh
echo "[SCRIPT] Creating temporary clone directory"
tempdir=`mktemp -d`
echo "[SCRIPT] Cloning to $tempdir"
git clone https://github.com/gbougakov/lessontimer.git $tempdir
if [ ! -f $tempdir/index.html ]; then
echo "Clone failed :("
exit
fi
echo "[SCRIPT] Moving files"
rm -rf ~/lessontimer
mv $tempdir ~/lessontimer
echo "[SCRIPT] Cleaning up"
rm -rf $tempdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment