Skip to content

Commit 6a64cb5

Browse files
committed
adds option -reveal-in-finder to makezip.sh
1 parent d82f67b commit 6a64cb5

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

misc/makezip.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cd "$(dirname "$0")/.."
44
OPT_HELP=false
55
OPT_TEXT=false
66
OPT_DISPLAY=false
7+
OPT_REVEAL_IN_FINDER=false
78
OUTFILE=
89

910
# parse args
@@ -26,6 +27,10 @@ while [[ $# -gt 0 ]]; do
2627
OPT_DISPLAY=true
2728
shift
2829
;;
30+
-reveal-in-finder)
31+
OPT_REVEAL_IN_FINDER=true
32+
shift
33+
;;
2934
-*)
3035
echo "$0: Unknown option $1" >&2
3136
OPT_HELP=true
@@ -48,10 +53,11 @@ fi
4853
if $OPT_HELP; then
4954
echo "Usage: $0 [options] <outfile>"
5055
echo "Options:"
51-
echo " -h, -help Show help."
52-
echo " -text Include Inter Text"
53-
echo " -display Include Inter Display"
54-
echo " -a, -all Include all fonts"
56+
echo " -h, -help Show help."
57+
echo " -text Include Inter Text"
58+
echo " -display Include Inter Display"
59+
echo " -a, -all Include all fonts"
60+
echo " -reveal-in-finder After creating the zip file, show it in Finder"
5561
exit 1
5662
fi
5763

@@ -143,3 +149,6 @@ popd >/dev/null
143149
rm -rf "$ZIPDIR"
144150

145151
echo "Created $OUTFILE"
152+
if $OPT_REVEAL_IN_FINDER && [ -f /usr/bin/open ]; then
153+
/usr/bin/open --reveal "$OUTFILE"
154+
fi

0 commit comments

Comments
 (0)