mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 22:08:13 -05:00
...
This commit is contained in:
@@ -428,9 +428,16 @@ else
|
||||
host=127.0.0.1
|
||||
port=7860
|
||||
url="http://\$host:\$port/"
|
||||
timeout=30
|
||||
start_time=\$(date +%s)
|
||||
|
||||
until (echo >"/dev/tcp/\$host/\$port") >/dev/null 2>&1; do
|
||||
while ! (echo >"/dev/tcp/\$host/\$port") >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
elapsed=\$(( \$(date +%s) - \$start_time ))
|
||||
if [ "\$elapsed" -ge "\$timeout" ]; then
|
||||
echo "Timeout after \${timeout}s: \${url} not responding"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
open "\$url"
|
||||
@@ -439,6 +446,7 @@ else
|
||||
open -a Terminal "$SCRIPT_DIR/ebook2audiobook.sh"
|
||||
EOF
|
||||
|
||||
|
||||
chmod +x "$MACOS/$APP_NAME"
|
||||
cp "$ICON_PATH" "$RESOURCES/AppIcon.icns"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user