first commit
This commit is contained in:
23
scripts/clean_data.sh
Executable file
23
scripts/clean_data.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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 {} \;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user