forked from josch/mmdebstrap
test.sh: do not continue if http server failed to start
This commit is contained in:
parent
6da8791c11
commit
7deadcb988
1 changed files with 8 additions and 2 deletions
10
test.sh
10
test.sh
|
@ -30,14 +30,20 @@ fi
|
||||||
|
|
||||||
./make_mirror.sh
|
./make_mirror.sh
|
||||||
|
|
||||||
trap 'kill $pid' INT QUIT TERM EXIT
|
|
||||||
|
|
||||||
cd mirror
|
cd mirror
|
||||||
python3 -m http.server 8000 2>/dev/null & pid=$!
|
python3 -m http.server 8000 2>/dev/null & pid=$!
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
# wait for the server to start
|
# wait for the server to start
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
if ! kill -0 $pid; then
|
||||||
|
echo "failed to start http server"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap 'kill $pid' INT QUIT TERM EXIT
|
||||||
|
|
||||||
echo "running http server with pid $pid"
|
echo "running http server with pid $pid"
|
||||||
|
|
||||||
export SOURCE_DATE_EPOCH=$(date +%s)
|
export SOURCE_DATE_EPOCH=$(date +%s)
|
||||||
|
|
Loading…
Reference in a new issue