Commit 103db632 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve rsync_all.sh

parent 85cabeaf
...@@ -9,9 +9,25 @@ ...@@ -9,9 +9,25 @@
# Подключаем конфигурационные параметры # Подключаем конфигурационные параметры
#. ./scripts/config.sh #. ./scripts/config.sh
LOGFILE=$(realpath -e $0).log LOGFILE=/dev/stdout
FORCE=''
if [ "$1" = "--force" ] ; then
FORCE="$1"
shift
fi
CP=$(cat $TMPDIR/rsync_pid 2>/dev/null)
if [ -n "$CP" ] && [ -d "/proc/$CP" ] ; then
echo "Run conflicts with $CP" >> $LOGFILE
date >> $LOGFILE
[ -n "$FORCE" ] || exit
fi
echo "$$" >$TMPDIR/rsync_pid
#LOGFILE=$(realpath -e $0).log
date > $LOGFILE date > $LOGFILE
exec >> $LOGFILE
# output stdout to file # output stdout to file
#exec >> $LOGFILE #exec >> $LOGFILE
...@@ -145,7 +161,8 @@ for i in Sisyphus ; do ...@@ -145,7 +161,8 @@ for i in Sisyphus ; do
sync_branches $i sync_branches $i
done done
date > $LOGFILE date >> $LOGFILE
rm -f $TMPDIR/rsync_pid
# for update x86_32 # for update x86_32
#$RPMS/arepo.sh > $RPMS/arepo.log #$RPMS/arepo.sh > $RPMS/arepo.log
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment