#!/bin/sh

DIR_HTML=/var/www/html
P7ZIP=$(which 7z)

ARG=$1

if [ -z "$ARG" ]; then
  echo "USAGE:$(basename $0) <date_a_enlever>"
  echo "Format date : YYYYMM"
  exit 1
fi

SAVED_DIR=$(pwd)

cd $DIR_HTML
7z x DK_proof.7z
rm -f DK_proof.7z

cd ./DK_proof
rm -Rf ${ARG}*

cd ..
7z a DK_proof.7z DK_proof
rm -Rf DK_proof

cd $SAVED_DIR
echo "done"

