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 echo $date
./do_process $date | less if [[ -f ${date}.log ]]; then
./do_process $date | less
fi
echo echo
#echo -n Press ENTER for ${date}... #echo -n Press ENTER for ${date}...
#read #read

View File

@ -4,15 +4,19 @@ MONTH=$(( $(date +%m) - 1 ))
if [ "x$1" == "x" ] if [ "x$1" == "x" ]
then then
YEAR=$(( $(date +%Y) - 1)) YEAR=$(( $(date +%Y) - 1))
ONESET=true
else else
YEAR=$1 YEAR=$1
fi fi
echo "Tarring up for year ${YEAR}..."
if [ $MONTH -eq 0 ]; if [ $MONTH -eq 0 ];
then then
MONTH=12 MONTH=12
YEAR=$(( $YEAR - 1)) if [[ ! ${ONESET} ]]; then
YEAR=$(( $YEAR - 1))
fi
fi fi
tar -cvJf $YEAR.tar.xz $YEAR-*.tar.xz && rm -v $YEAR-*.tar.xz tar -cvJf $YEAR.tar $YEAR-*.tar.xz --remove-files