Skip to content

Commit 77aae0a

Browse files
committed
fix: use fetch-dashboard.sh in test.sh
update fetch-dashboard.sh to allow passing in a separate argument for url
1 parent 0c15a60 commit 77aae0a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/local/fetch-dashboard.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
# Fetch a new dashboard image, make sure to output it to "$1".
33
# For example:
4-
$(dirname $0)/../ht -d -q -o "$1" get https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png
4+
$(dirname $0)/../ht -d -q -o "$1" get ${2:-"https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png"}

src/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
DIR="$(dirname $0)"
22
DASH_PNG="$DIR/dash.png"
3+
FETCH_DASHBOARD_CMD="$DIR/local/fetch-dashboard.sh"
34

45
echo "Refreshing dashboard"
56
"$DIR/wait-for-wifi.sh"
67

7-
$(dirname $0)/ht -d -q -o "$DASH_PNG" get $1
8+
"$FETCH_DASHBOARD_CMD" "$DASH_PNG" $1
89

910
echo "Full screen refresh"
1011
/usr/sbin/eips -f -g "$DASH_PNG"

0 commit comments

Comments
 (0)