Minor modifications

This commit is contained in:
Trey Blancher 2018-08-09 11:55:23 -04:00
parent e587df1cf6
commit f3a16201c1
2 changed files with 9 additions and 4 deletions

5
chug
View File

@ -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

View File

@ -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