{
if [[ $# -lt 1 ]]; then
echo "Usage: ${0##*/} configFile=/path/to/config"
- echo "expert: ${0##*/} alienFindCommand=\"alien_find /some/path/ file\" [opt=value]"
+ echo 'expert: ${0##*/} alienFindCommand="alien_find /some/path/ file" [opt=value]'
return
fi
-
+
# try to load the config file
#[[ ! -f $1 ]] && echo "config file $1 not found, exiting..." | tee -a $logFile && exit 1
if ! parseConfig "$@"; then return 1; fi
- if [[ -z ${alienFindCommand} ]] && echo "alienFindCommand not defined!" && return 1
+ [[ -z ${alienFindCommand} ]] && echo "alienFindCommand not defined!" && return 1
#if not set, use the default group
[[ -z ${alienSyncFilesGroupOwnership} ]] && alienSyncFilesGroupOwnership=$(id -gn)
exec 6>&1
exec 1>$logFile 2>&1
fi
-
+
newFilesList=$logOutputPath/"newFiles.list"
rm -f $newFilesList
touch $newFilesList
originalEntryIndex=${candidateDBrecord[0]}
[[ $lineNumber -ne $originalEntryIndex ]] && continue
fi
-
+
redownloading=""
if [[ -f ${destination} ]]; then
#soft link the downloaded file (maybe to provide a consistent link to the latest version)
# $ALIEN_ROOT/api/bin/alien-token-init $alienUserName
# #source /tmp/gclient_env_$UID
#fi
-
+
export copyMethod
export copyScript
export copyTimeout
done < ${alienFileListCurrent}
[[ $alienFileCounter -gt 0 ]] && mv -f $alienFileListCurrent $localAlienDatabase
-
- echo ${0##*/} DONE
+
+ echo "${0##*/} DONE"
if [[ $allOutputToLog -eq 1 ]]; then
exec 1>&6 6>&-
cat ${newFilesList} ${redoneFilesList} > ${updatedFilesList}
eval "${executeEnd}"
-
+
echo alienFindCommand:
echo " $alienFindCommand"
echo
secondsToSuicide=$(( 10*3600 ))
localPathPrefix="${PWD}"
#define alienSync_localPathPrefix in your env to have a default central location
- if [[ -n ${alienSync_localPathPrefix} ]] && localPathPrefix=${alienSync_localPathPrefix}
+ [[ -n ${alienSync_localPathPrefix} ]] && localPathPrefix=${alienSync_localPathPrefix}
logOutputPath="${localPathPrefix}/alienSyncLogs"
unzipFiles=0
allOutputToLog=0