mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-22 01:47:24 +00:00
15 lines
402 B
Bash
Executable File
15 lines
402 B
Bash
Executable File
#!/bin/bash
|
|
# This script waits for the build to finish by checking for the modified
|
|
# time stamps of `start` and `result`
|
|
set -ex
|
|
thisdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
function modified_time_s {
|
|
date +%s -r $1 2>/dev/null || echo -1
|
|
}
|
|
|
|
while [ `modified_time_s $thisdir/start` -gt `modified_time_s $thisdir/result` ]; do
|
|
sleep 1
|
|
done
|
|
echo "Build finished!"
|