You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
460 B

#!/bin/bash
if [ "$#" -eq  "0" ]
then
  if [ -d $DATA_PATH ]
  then
	  find $DATA_PATH -mtime +1 -type f -name *.png -exec rm -f {} \;
	  find $DATA_PATH -mtime +1 -type f -name *.zip -exec rm -f {} \;
    find $TMP_PATH -mtime +3 -type f -name *.flag -exec rm -f {} \;
  fi
else
  if [ "$1" -eq "FULL" ]
  then
    if [ -d $DATA_PATH ]
    then
        rm -f $DATA_PATH/*/*
    fi
    if [ -d $TMP_PATH ]
    then
        rm -f $TMP_PATH/*
    fi
  fi
fi