Some more code compliance
This commit is contained in:
parent
78f7fe3b9c
commit
c81b2293e8
|
@ -37,7 +37,7 @@ Whenever there is some idea to postpone, use #TODO: (exact match for searches)
|
|||
|
||||
All local variables are lowercase, separated by _ (ex: low_wait)
|
||||
All global variables full upercase, separated by _ (ex: EXEC_TIME)
|
||||
All instance variables (verbose, silent, etc) have prefix _ and are full upercase, separated by _ (ex: _VERBOSE)
|
||||
All instance variables (verbose, silent, etc) have prefix _ and are full upercase, separated by _ (ex: _VERBOSE_INSTANCE)
|
||||
|
||||
++++ Functions
|
||||
|
||||
|
|
12
osync.sh
12
osync.sh
|
@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
|
|||
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||
PROGRAM_VERSION=1.1-dev
|
||||
PROGRAM_BUILD=2015090904
|
||||
PROGRAM_BUILD=2015091001
|
||||
|
||||
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
||||
if ! type -p "$BASH" > /dev/null; then
|
||||
|
@ -904,7 +904,7 @@ function WriteLockFiles {
|
|||
}
|
||||
|
||||
function LockDirectories {
|
||||
if [ $nolocks -eq 1 ]; then
|
||||
if [ $_NOLOCKS -eq 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
@ -971,7 +971,7 @@ function LockDirectories {
|
|||
}
|
||||
|
||||
function UnlockDirectories {
|
||||
if [ $nolocks -eq 1 ]; then
|
||||
if [ $_NOLOCKS -eq 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
@ -2040,7 +2040,7 @@ error_alert=0
|
|||
soft_stop=0
|
||||
quick_sync=0
|
||||
sync_on_changes=0
|
||||
nolocks=0
|
||||
_NOLOCKS=0
|
||||
osync_cmd=$0
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
|
@ -2105,10 +2105,10 @@ do
|
|||
;;
|
||||
--on-changes)
|
||||
sync_on_changes=1
|
||||
nolocks=1
|
||||
_NOLOCKS=1
|
||||
;;
|
||||
--no-locks)
|
||||
nolocks=1
|
||||
_NOLOCKS=1
|
||||
;;
|
||||
*)
|
||||
if [ $first == "0" ]; then
|
||||
|
|
Loading…
Reference in New Issue