diff options
author | Rasmus Andersson <rasmus@notion.se> | 2020-04-10 01:11:42 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2020-04-10 01:11:42 +0300 |
commit | 6a64cb5225b65425ea0cd7862e7f47048add1a56 (patch) | |
tree | 67e4eca41c90fd9e80b5dce2946aa5fc3674bba9 /misc | |
parent | d82f67bfa95beafff1dca200eda574f70ec5b939 (diff) | |
download | inter-6a64cb5225b65425ea0cd7862e7f47048add1a56.tar.xz |
adds option -reveal-in-finder to makezip.sh
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/makezip.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/misc/makezip.sh b/misc/makezip.sh index 96bedef66..f1562846f 100755 --- a/misc/makezip.sh +++ b/misc/makezip.sh @@ -4,6 +4,7 @@ cd "$(dirname "$0")/.." OPT_HELP=false OPT_TEXT=false OPT_DISPLAY=false +OPT_REVEAL_IN_FINDER=false OUTFILE= # parse args @@ -26,6 +27,10 @@ while [[ $# -gt 0 ]]; do OPT_DISPLAY=true shift ;; + -reveal-in-finder) + OPT_REVEAL_IN_FINDER=true + shift + ;; -*) echo "$0: Unknown option $1" >&2 OPT_HELP=true @@ -48,10 +53,11 @@ fi if $OPT_HELP; then echo "Usage: $0 [options] <outfile>" echo "Options:" - echo " -h, -help Show help." - echo " -text Include Inter Text" - echo " -display Include Inter Display" - echo " -a, -all Include all fonts" + echo " -h, -help Show help." + echo " -text Include Inter Text" + echo " -display Include Inter Display" + echo " -a, -all Include all fonts" + echo " -reveal-in-finder After creating the zip file, show it in Finder" exit 1 fi @@ -143,3 +149,6 @@ popd >/dev/null rm -rf "$ZIPDIR" echo "Created $OUTFILE" +if $OPT_REVEAL_IN_FINDER && [ -f /usr/bin/open ]; then + /usr/bin/open --reveal "$OUTFILE" +fi |