phoghawk / twitterbuddy

Command line utility to print recent tweets of you, your friends, or everyone on twitter.

This URL has Read+Write access

phoghawk (author)
Wed Mar 11 18:21:41 -0700 2009
commit  eaf6aeefd030cfecf3f799eac8d31b889df3b8fe
tree    3f2898fc268ce10e7540dc3d8870f2e0ab3c8c48
parent  30264f83febe9eb831f1a7b56ebf91a7e6ebffee
twitterbuddy / install.command
100755 54 lines (45 sloc) 1.477 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#
# install script for twitterBuddy
# (c) 2009 Benjamin Goering
#
# Bash code for this heavily borrowed/inspired by the icalBuddy install
# script. Download icalBuddy at http://hasseg.org/icalBuddy/
# (c) 2008-2009 Ali Rantakari
#
 
DN=`dirname $0`
THISDIR="`cd $DN; pwd`"
 
BINDIR=/usr/local/bin
BINFILE="${THISDIR}/twitterBuddy"
 
 
 
if [ ! -e "${BINFILE}" ];then
echo "Error: can not find twitterBuddy. Make sure you're running this script from within the distribution directory (the same directory where twitterBuddy resides.)"
exit 1
fi
echo
echo "This script will install:"
echo
echo "Rubygems: htmlentities, twitter"
echo "twitterBuddy script to: ${BINDIR}"
echo
echo "We\'ll need administrator rights to install to this location so please enter your admin password when asked."
echo "Press any key to continue installing or Ctrl-C to cancel."
read
echo
sudo -v
if [ ! $? -eq 0 ];then echo "error! aborting."; exit 10; fi
echo
 
echo -n "Installing Rubygems: twitter, htmlentities"
sudo gem install twitter htmlentities
if [ ! $? -eq 0 ];then echo "...error! aborting."; exit 10; fi
echo "done."
 
echo -n "Creating directory..."
sudo mkdir -p ${BINDIR}
if [ ! $? -eq 0 ];then echo "...error! aborting."; exit 10; fi
echo "done."
 
echo -n "Installing the twitterBuddy ruby script..."
sudo cp -f "${BINFILE}" "${BINDIR}"
if [ ! $? -eq 0 ];then echo "...error! aborting."; exit 10; fi
echo "done."
 
echo
echo "twitterBuddy has been successfully installed."
echo