Added ls-fail check
This commit is contained in:
parent
e448a85db6
commit
5271dbbaeb
|
@ -6,7 +6,16 @@ DIRECTORY=`dirname "$ABSOLUTE_FILENAME"`
|
||||||
source ${DIRECTORY}/config
|
source ${DIRECTORY}/config
|
||||||
currStamp=`date +%s`
|
currStamp=`date +%s`
|
||||||
|
|
||||||
for backup_dir in `ls -d ${prefix}/backup-*`
|
list=`ls -d ${prefix}/backup-*`
|
||||||
|
|
||||||
|
if [ "$?" != 0 ]
|
||||||
|
then
|
||||||
|
echo "FAIL - Directory listnig failed!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
for backup_dir in ${list}
|
||||||
do
|
do
|
||||||
echo Directory ${backup_dir}:
|
echo Directory ${backup_dir}:
|
||||||
lastFull=`cd ${backup_dir}/ && ls -t *-[F].t* 2>/dev/null | head -n 1`
|
lastFull=`cd ${backup_dir}/ && ls -t *-[F].t* 2>/dev/null | head -n 1`
|
||||||
|
|
Loading…
Reference in New Issue