mirror of
https://github.com/deajan/obackup.git
synced 2025-02-05 19:03:50 +01:00
Fixed recursive directory exclude and remote os detection
This commit is contained in:
parent
d963c02c06
commit
4b212311ff
43
obackup.sh
43
obackup.sh
@ -3,7 +3,7 @@
|
|||||||
###### Remote (or local) backup script for files & databases
|
###### Remote (or local) backup script for files & databases
|
||||||
###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
||||||
OBACKUP_VERSION=1.84RC3
|
OBACKUP_VERSION=1.84RC3
|
||||||
OBACKUP_BUILD=1611201301
|
OBACKUP_BUILD=1911201301
|
||||||
|
|
||||||
DEBUG=no
|
DEBUG=no
|
||||||
SCRIPT_PID=$$
|
SCRIPT_PID=$$
|
||||||
@ -345,23 +345,26 @@ function GetOperatingSystem
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $REMOTE_OS_VAR in
|
if [ "$REMOTE_BACKUP" == "yes" ]
|
||||||
"Linux"*)
|
then
|
||||||
REMOTE_OS="Linux"
|
case $REMOTE_OS_VAR in
|
||||||
;;
|
"Linux"*)
|
||||||
"FreeBSD"*)
|
REMOTE_OS="Linux"
|
||||||
REMOTE_OS="FreeBSD"
|
;;
|
||||||
;;
|
"FreeBSD"*)
|
||||||
"MINGW32"*)
|
REMOTE_OS="FreeBSD"
|
||||||
REMOTE_OS="msys"
|
;;
|
||||||
;;
|
"MINGW32"*)
|
||||||
"Darwin"*)
|
REMOTE_OS="msys"
|
||||||
REMOTE_OS="MacOSX"
|
;;
|
||||||
;;
|
"Darwin"*)
|
||||||
*)
|
REMOTE_OS="MacOSX"
|
||||||
LogError "Running on remote >> $REMOTE_OS_VAR << not supported. Please report to the author."
|
;;
|
||||||
exit 1
|
*)
|
||||||
esac
|
LogError "Running on remote >> $REMOTE_OS_VAR << not supported. Please report to the author."
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$DEBUG" == "yes" ]
|
if [ "$DEBUG" == "yes" ]
|
||||||
then
|
then
|
||||||
@ -846,6 +849,7 @@ function ListDirectories
|
|||||||
for line in $(cat $RUN_DIR/obackup_dirs_recurse_list_$SCRIPT_PID)
|
for line in $(cat $RUN_DIR/obackup_dirs_recurse_list_$SCRIPT_PID)
|
||||||
do
|
do
|
||||||
file_exclude=0
|
file_exclude=0
|
||||||
|
IFS=$PATH_SEPARATOR_CHAR
|
||||||
for k in $DIRECTORIES_RECURSE_EXCLUDE_LIST
|
for k in $DIRECTORIES_RECURSE_EXCLUDE_LIST
|
||||||
do
|
do
|
||||||
if [ "$k" == "$line" ]
|
if [ "$k" == "$line" ]
|
||||||
@ -853,7 +857,8 @@ function ListDirectories
|
|||||||
file_exclude=1
|
file_exclude=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
IFS=$' \n'
|
||||||
|
|
||||||
if [ $file_exclude -eq 0 ]
|
if [ $file_exclude -eq 0 ]
|
||||||
then
|
then
|
||||||
if [ "$DIRECTORIES_TO_BACKUP" == "" ]
|
if [ "$DIRECTORIES_TO_BACKUP" == "" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user