Skip to content

Instantly share code, notes, and snippets.

@dlangille
Created April 28, 2020 23:19
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 dlangille/ee1fdaea6abfda8509d5f1ed818a97f1 to your computer and use it in GitHub Desktop.
Save dlangille/ee1fdaea6abfda8509d5f1ed818a97f1 to your computer and use it in GitHub Desktop.
LOGGERTAG="$0"
set -e
# invoke this to get the right value for $LOGGER
. config.sh
$LOGGER -t ${LOGGERTAG} starts
# I'm hardcoding this path here.
# This delete is too easy to mess up with a configuration file setting
DELDIR=/var/db/freshports/cache/packages
mkdir $DELDIR/DELETEME
mv $DELDIR/* DELETEME
rm -rf $DELDIR DELETEME
${LOGGER} -t ${LOGGERTAG} finishes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment