blob: c5e6474d63fa1bb7ae17fe73aa51032555b7cd04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
get() {
echo "title $1"
echo "add_tab"
if [ "$1" != "/" ]; then
echo "title Go to parent directory"
echo "url .."
echo "thumbnail_url folder.png"
echo "thumbnail_size 32x32"
echo "add_body_item"
fi
for f in "$1/"*; do
echo "title $f"
echo "url $f"
if [ -d "$f" ]; then
echo "thumbnail_url folder.png"
else
echo "thumbnail_url file.png"
fi
echo "thumbnail_size 32x32"
echo "add_body_item"
done
}
case "$ACTION" in
"get") get "$URL";;
*) echo "error unexpected action $ACTION"; exit 1;;
esac
|