Minor modifications
This commit is contained in:
parent
e587df1cf6
commit
f3a16201c1
5
chug
5
chug
|
@ -13,8 +13,9 @@ for date in $(gdate +%F -d "${DATE}") \
|
|||
|
||||
echo $date
|
||||
|
||||
./do_process $date | less
|
||||
|
||||
if [[ -f ${date}.log ]]; then
|
||||
./do_process $date | less
|
||||
fi
|
||||
echo
|
||||
#echo -n Press ENTER for ${date}...
|
||||
#read
|
||||
|
|
|
@ -4,15 +4,19 @@ MONTH=$(( $(date +%m) - 1 ))
|
|||
if [ "x$1" == "x" ]
|
||||
then
|
||||
YEAR=$(( $(date +%Y) - 1))
|
||||
ONESET=true
|
||||
else
|
||||
YEAR=$1
|
||||
fi
|
||||
|
||||
echo "Tarring up for year ${YEAR}..."
|
||||
if [ $MONTH -eq 0 ];
|
||||
then
|
||||
MONTH=12
|
||||
YEAR=$(( $YEAR - 1))
|
||||
if [[ ! ${ONESET} ]]; then
|
||||
YEAR=$(( $YEAR - 1))
|
||||
fi
|
||||
fi
|
||||
|
||||
tar -cvJf $YEAR.tar.xz $YEAR-*.tar.xz && rm -v $YEAR-*.tar.xz
|
||||
tar -cvJf $YEAR.tar $YEAR-*.tar.xz --remove-files
|
||||
|
||||
|
|
Loading…
Reference in New Issue