#!/usr/bin/env bash

if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

# Delete any currently existing patchbot
rm -rf "$SAGE_LOCAL/bin/patchbot"

# Copy into final location.
# The sage-patchbot script knows how to call this...
cp -Rv src "$SAGE_LOCAL/bin/patchbot"
