dip

old school recipes for janitorial snafu.
git clone git://git.ricketyspace.net/dip.git
Log | Files | Refs

commit e45516a8f09484509971dc46b60613d94f435271
parent c1442e1af6c5076e2f305212aaa152c1f2b5829c
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 11 Sep 2018 01:00:29 +0000

usr: tball: Add rm_file.

* usr/local/bin/tball (rm_file): New function.

Diffstat:
usr/local/bin/tball | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/usr/local/bin/tball b/usr/local/bin/tball @@ -109,6 +109,20 @@ parse_maxtb() { fi } +rm_file() { + local F=$1 + + if [ ! -f $F ]; then + echo 'File not found: Cannot remove '$F + return 0 + fi + + # Remove file. + echo 'Removing '$F'...' + rm $F && return 0 + + return 1 # rm failed +} clean_ol_tbs() { local D=$1