Skip to content

Instantly share code, notes, and snippets.

@jsoma
Last active December 17, 2022 02:54
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jsoma/5ef3045b2004a610455f371479a6f0cf to your computer and use it in GitHub Desktop.
Save jsoma/5ef3045b2004a610455f371479a6f0cf to your computer and use it in GitHub Desktop.
Installing tweego and story-formats on OS X.

Installing tweego is a little more complicated than (I think) it should be, so here's a script to do it for you. If you'd like to one-line it, you can just cut and paste this in Terminal:

/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/jsoma/5ef3045b2004a610455f371479a6f0cf/raw/b6c9224faa18fd52f3e1bf7120af17eed6da8ec1/tweego.sh)"

Once it's installed, tweego docs are here. You'll probably want to read these twee docs, too.

# Building temporary directory
TMP=$(mktemp -d)
cd $TMP
# Downloading tweego 2.1.1
curl -OL https://github.com/tmedwards/tweego/releases/download/v2.1.1/tweego-2.1.1-macos-x64.zip
# Extracting
unzip -o tweego-2.1.1-macos-x64.zip
# Setting permissions for tweego so it is executable
chmod +x tweego
# Creating target directories
TARGET=$HOME/tweego
mkdir -p $TARGET
cp -R . $TARGET
# Check which shell (older OS X is bash, newer is zsh)
if [ -n "`$SHELL -c 'echo $ZSH_VERSION'`" ]; then
CONFIG=~/.zshrc
else
CONFIG=~/.bash_profile
fi
# Adding to PATH
echo "export PATH=$TARGET:\$PATH" >> $CONFIG
# Updating current PATH
source $CONFIG
echo "If the tweego command does not work, try opening a new Terminal window"
@dylan-k
Copy link

dylan-k commented Apr 18, 2019

Those download URLs seem to have changed. Easily fixed but thought you might want to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment