#!/bin/bash DIR=$1 [ $# -lt 1 ] && echo "Directory argument is missing" && exit [ $# -gt 1 ] && echo "Too many arguments" && exit [ ! -d $DIR ] && echo "Directory ${DIR} does not exist" && exit echo -ne " 🔎 Verify file" bzip2 -tv $TAR [ $? -ne 0 ] && "Cannot verify $TAR" && exit ./db -e ${DIR} tar -cjpf ${DIR}.tar.bz2 ${DIR} ${DIR}.* ls -l ${DIR}.tar.bz2 --color=auto