- Get your Twitter archive;
- Save this script as an executable in the root folder of your tweets archive;
- Execute the script from anywhere (e.g. a cron job).
It auto-installs grailbird_updater in an isolated location. Thanks, @DeMarko!
It auto-installs grailbird_updater in an isolated location. Thanks, @DeMarko!
#!/usr/bin/env bash | |
set -e | |
here="$(cd "${0%/*}" && pwd)" | |
export GEM_HOME="$here/.gem" | |
export GEM_PATH="$GEM_HOME" | |
export PATH="$GEM_HOME/bin:$PATH" | |
if ! [ -d "$GEM_HOME" ]; then | |
ruby_version="$(ruby -e 'puts RUBY_VERSION')" | |
if [ "$ruby_version" \< "1.9" ]; then | |
echo "grailbird_updater needs Ruby 1.9 to run (was $ruby_version)" >&2 | |
exit 1 | |
fi | |
gem install --no-rdoc --no-ri grailbird_updater | |
fi | |
exec grailbird_updater --verbose "$here" |