From 47267ccf2c352348d2d47ff0d91a628d09fdafa8 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Fri, 1 Jun 2012 13:28:14 -0500 Subject: sboclean script created. --- sboclean | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 sboclean (limited to 'sboclean') diff --git a/sboclean b/sboclean new file mode 100755 index 0000000..987e142 --- /dev/null +++ b/sboclean @@ -0,0 +1,78 @@ +#!/usr/bin/env perl +# +# sboclean +# script to clean stuff left around from sbotools. +# +# author: Jacob Pipkin +# date: Boomtime, the 6th day of Confusion in the YOLD 3178 +# license: WTFPL + +use SBO::Lib; +use File::Basename; +use Getopt::Std; +use File::Path qr(remove_tree); +use strict; +use warnings FATAL => 'all'; + +my %config = %SBO::Lib::config; +my $self = basename ($0); + +sub show_usage { + print <; + next FIRST unless $test =~ /^[Yy]/; + } + unlink $ls if -f $ls; + remove_tree $ls if -d $ls; + } +} + +sub clean_distfiles { + remove_stuff ($config{SBO_HOME} .'/distfiles'); + return; +} + +sub clean_workdirs { + remove_stuff ('/tmp/SBo'); + return; +} + +clean_distfiles () if $clean_dist eq 'TRUE'; +clean_workdirs () if $clean_work eq 'TRUE'; + +exit 0; -- cgit v1.2.3