Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
Created December 30, 2020 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwilkerson/fcacc6fb4681df9946b499e0da178333 to your computer and use it in GitHub Desktop.
Save robwilkerson/fcacc6fb4681df9946b499e0da178333 to your computer and use it in GitHub Desktop.
#/usr/bin/env bash
# Move the downloaded zip to the evaluating directory
download=$(find ~/Desktop -regex '.*/[0-9]\{6,\}\.zip')
zip=$(basename "$download")
homework=${zip%.*}
echo "Download: $download"
echo "Zip: $zip"
echo "Homework: $homework"
mv "$download" .
echo "unzipping..."
unzip "$zip" -d "$homework"
echo "syncing..."
rsync -av --no-perms "./$homework" homeworkgrading.com:~
code "./$homework" &
ssh -t homeworkgrading.com "cd ~/$homework ; bash"
rm "./$zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment