mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
max run time is controlled by tunasync now
This commit is contained in:
parent
b55d9a8938
commit
6257854349
20
pypi.sh
20
pypi.sh
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
BANDERSNATCH=${BANDERSNATCH:-"/usr/local/bin/bandersnatch"}
|
BANDERSNATCH=${BANDERSNATCH:-"/usr/local/bin/bandersnatch"}
|
||||||
TUNASYNC_UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://pypi.org/"}
|
TUNASYNC_UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://pypi.org/"}
|
||||||
CONF="/tmp/bandersnatch.conf"
|
CONF="/tmp/bandersnatch.conf"
|
||||||
@ -34,11 +35,7 @@ packages =
|
|||||||
tensorflow-io-nightly
|
tensorflow-io-nightly
|
||||||
tf-nightly-cpu
|
tf-nightly-cpu
|
||||||
EOF
|
EOF
|
||||||
/usr/bin/timeout -s INT 36000 $BANDERSNATCH -c $CONF mirror
|
exec $BANDERSNATCH -c $CONF mirror
|
||||||
if [[ $? == 124 ]]; then
|
|
||||||
echo 'Sync timeout (/_\\)'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cat > $CONF << EOF
|
cat > $CONF << EOF
|
||||||
[mirror]
|
[mirror]
|
||||||
@ -52,17 +49,6 @@ stop-on-error = false
|
|||||||
delete-packages = false
|
delete-packages = false
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$BANDERSNATCH -c $CONF mirror
|
exec $BANDERSNATCH -c $CONF mirror
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TODOFILE="${TUNASYNC_WORKING_DIR}/todo"
|
|
||||||
if [[ -f $TODOFILE ]]; then
|
|
||||||
rsize=`stat -c "%s" ${TODOFILE}`
|
|
||||||
if [[ "$rsize" != "0" ]]; then
|
|
||||||
echo "Sync Failed T_T"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Sync Done ^_-"
|
|
||||||
exit 0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user