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
|
||||
|
||||
trap 'kill $pid' INT QUIT TERM EXIT
|
||||
|
||||
cd mirror
|
||||
python3 -m http.server 8000 2>/dev/null & pid=$!
|
||||
cd -
|
||||
|
||||
# wait for the server to start
|
||||
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"
|
||||
|
||||
export SOURCE_DATE_EPOCH=$(date +%s)
|
||||
|
|
Loading…
Reference in a new issue