#!/bin/bash if [ `pwd` = "/home/yahya/Live_Build/auto" ] then tar cvpf ../backups/`date +%d-%m-%Y`-auto.tar . else dir=`pwd -P | cut -d / -f 5` tar cvpf ../backups/`date +%d-%m-%Y`-$dir.tar auto/ config/ \ --exclude=config/hooks/0* --exclude=config/include*/* fi