Last active
July 10, 2016 02:49
-
-
Save lyndell/c42c4d5f23346cf70730 to your computer and use it in GitHub Desktop.
Open a new file in ByWord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash -x | |
# | |
# Copyright (c) 2015 Lyndell Rottmann | |
# | |
# Debug mode on/off: (default off) | |
set +x | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
if [ ! $1 ] | |
then | |
echo "No file specified." | |
exit; | |
else | |
file=$1 | |
# if file doesn't exist, create it. | |
if [ ! -e $file ] | |
then | |
touch $file | |
fi | |
open -a byword $file | |
fi | |
else | |
# Not a Mac | |
echo "Byword is a Mac only application.\n" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment