From 3b864d8f595ab9e745f11c976ed22dbfa49d27e9 Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 3 Jan 2012 14:48:00 +0100 Subject: [PATCH] implement cleanLogs() & cleanTemp() --- ezbuild | 24 ------------------------ ezsync | 24 ------------------------ libraries/filesystem | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 48 deletions(-) delete mode 100755 ezbuild delete mode 100755 ezsync diff --git a/ezbuild b/ezbuild deleted file mode 100755 index d8ef4ce..0000000 --- a/ezbuild +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright 2010-2012, Asio Software Technologies -# Distributed under the terms of the GNU General Public License v3 - - -# Declare basic system variables -EZNAME=$(basename ${0}) -EZROOT=$(dirname $(readlink -ne ${0})) - -# Load necessary files -source /etc/profile -source ${EZROOT}/libraries/common - -# Load EzBuild libraries & configuration -loadLibraries -loadConfiguration - -# Print EzBuild notice -printNotice - -# Check system requirements -printInfo "Checking system prerequisites..." -checkPrerequisites -[ ${?} -ne 0 ] && die "Your environment does not meet EzBuild requirements" diff --git a/ezsync b/ezsync deleted file mode 100755 index d8ef4ce..0000000 --- a/ezsync +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright 2010-2012, Asio Software Technologies -# Distributed under the terms of the GNU General Public License v3 - - -# Declare basic system variables -EZNAME=$(basename ${0}) -EZROOT=$(dirname $(readlink -ne ${0})) - -# Load necessary files -source /etc/profile -source ${EZROOT}/libraries/common - -# Load EzBuild libraries & configuration -loadLibraries -loadConfiguration - -# Print EzBuild notice -printNotice - -# Check system requirements -printInfo "Checking system prerequisites..." -checkPrerequisites -[ ${?} -ne 0 ] && die "Your environment does not meet EzBuild requirements" diff --git a/libraries/filesystem b/libraries/filesystem index 50dd1fa..859de7f 100644 --- a/libraries/filesystem +++ b/libraries/filesystem @@ -3,6 +3,20 @@ # Distributed under the terms of the GNU General Public License v3 +#------------------------------------------------------------------------------- +# Completely removes log files +#------------------------------------------------------------------------------- +function cleanLogs() { + rm -rf ${LOGFILE} &> /dev/null +} + +#------------------------------------------------------------------------------- +# Completely removes temp directory +#------------------------------------------------------------------------------- +function cleanTemp() { + rm -rf ${TEMPDIR} &> /dev/null +} + #------------------------------------------------------------------------------- # Downloads files into specified or current directory # Parameters: %url% %directory%