mirror: Fix tabs to spaces
This commit is contained in:
parent
770d6a74d3
commit
0be436e8b0
1 changed files with 16 additions and 16 deletions
|
@ -39,19 +39,19 @@ NOOP=""
|
|||
EXTRA_OPTS=""
|
||||
while getopts "vhln" c ; do
|
||||
case $c in
|
||||
v)
|
||||
VERBOSE=true
|
||||
EXTRA_OPTS="${EXTRA_OPTS} -v --progress"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
l)
|
||||
echo "Available mirrors:"
|
||||
list_mirrors | sed -e 's/^/ /'
|
||||
exit 0
|
||||
;;
|
||||
v)
|
||||
VERBOSE=true
|
||||
EXTRA_OPTS="${EXTRA_OPTS} -v --progress"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
l)
|
||||
echo "Available mirrors:"
|
||||
list_mirrors | sed -e 's/^/ /'
|
||||
exit 0
|
||||
;;
|
||||
n)
|
||||
NOOP=" (DRY RUN)"
|
||||
EXTRA_OPTS="${EXTRA_OPTS} -n"
|
||||
|
@ -87,11 +87,11 @@ fi
|
|||
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
if kill -0 "$(cat $LOCKFILE)" ; then
|
||||
STARTED=" ($(stat --format='%y' $LOCKFILE))"
|
||||
STARTED=" ($(stat --format='%y' $LOCKFILE))"
|
||||
echo "ERR: Lockfile exists${STARTED}, exiting" 1>&2
|
||||
exit 1
|
||||
else
|
||||
echo "WARN: Removing stale lock file..." 1>&2
|
||||
echo "WARN: Removing stale lock file..." 1>&2
|
||||
rm -f "$LOCKFILE"
|
||||
fi
|
||||
fi
|
||||
|
@ -119,7 +119,7 @@ for mirror in "$@" ; do
|
|||
logmsg "Finished ${mirror} sync with exit status ${STATUS}${NOOP} ..."
|
||||
if [ "$POSTCMD" != "" ]; then
|
||||
logmsg "Running post for ${mirror} ..."
|
||||
$POSTCMD 2>&1 | logstream
|
||||
$POSTCMD 2>&1 | logstream
|
||||
logmsg "Finished post for ${mirror} ..."
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue