#!/bin/bash
#v present-file v. 1.0 by duus        (Feb 26, 2009)
#v   location: http://thedu.us/scripts/present-file/present-file
#h present-file, ready for a presentation., v 0.1, by duus
##################################################### VERSION INFO
#v present-file, ready for a presentation., v 0.1, by duus
#v
#v 	  type <present-file help> for more information
#v    or open source code with a text editor and read it:
#v    http://thedu.us/scripts/present-file/present-file/
#v
###################################################### INSTALL INFO
#i How to install present-file
#i  1. put the present-file bash script on your path (for example, ~/bin/)
#i  2. navigate to that directory
#i  3. type "chmod +x present-file" to make the script executable
#i  4. open the present-file script with your favorite text editor (pico present-file, for example)
#i  5. Navigate to the line called #SETTINGS
#i  6. Adjust settings as necessary.  Save the file.
#i  7. type "present-file help" for usage information
#i
###################################################### SETTINGS
#general settings; name and location of this script, for self-referencing.
_SCRIPT_NAME=present-file 
_SCRIPT_LOCATION=~/bin 
#you can also hardcode if you would like.  For example, your own bin:
#_SCRIPT_LOCATION=~/bin
#or, if you are running reuben, you can access reuben's bin:
#_SCRIPT_LOCATION=~/.reuben/.bin/
#don't forget that this program is merely a text file, and you must make 
#  it executable, regardless of where you place it.
#Script_Location is used in the standard functions, below.
#
###################################################### STD, FUNCTIONS (help, version, install)
# (h)elp, (v)ersion, and (i)nstall are standard.  I do not recommend changing them.
#   Reading them, on the other hand, to see how they work is encouraged.
#   Feel free to add another standard function.  If you do, please let me know if it is useful,
#    and whether you would mind if I included it in the standard code, with credit for you
#    in comments.  (Or an about section?  .... hmmmm)
#   These functions allow the output of the standard functions to be 
#   hardcoded into the source code.  (See #i and #v above for examples.) 
#
if [ "$1" = "version" -o "$1" = "v" ] 
	then 
	grep "^#v" $_SCRIPT_LOCATION/${_SCRIPT_NAME} | more 
	exit 1;
elif [ "$1" = "help" -o "$1" = "h" ]
	then
	grep "^#h" $_SCRIPT_LOCATION/${_SCRIPT_NAME} | more
	exit 1;
elif [ "$1" = "install" -o "$1" = "i" ]
	then
	grep "^#i" $_SCRIPT_LOCATION/${_SCRIPT_NAME} | more
	exit 1;
elif [ "$1" = "src" ]
	then
	echo "source code of ${_SCRIPT_NAME}, a duusscript"
	echo ""
	more $_SCRIPT_LOCATION/${_SCRIPT_NAME}
	exit 1;
fi 
# dont understand how this works?  see http://thedu.us/scripts/duushelp/ or run duushelp.sh
###############################################################
#---------------------------------------------------------#
#begin present-file   (Feb 26, 2009)
#--------------------------
rsync -vaur $* /Users/present/present/
echo "places files in /Users/present/present (putpwd)"
echo -n "/Users/present/present" | pbcopy
nicedate >> /Users/present/present/_notes.txt
echo "added $* " >> /Users/present/present/_notes.txt
#h  <help>, <version>, <install>, <src> 
#h    give help, version, install information, and source code, respectively
#--------------------------
#<tt>                 :               end present-file
#                     . 
#           ...---.,o8:i__,8Pd8 
#        _//      `"' :  d8'",8d8 
#      ,/''  vVv      . dP   b8P.8|
#     ./;|  d^_^b     .     ,P O||]
#      |||  duus@thedu.us\     |||| 
#      |||  duus.thedu.us/      || 
#      ||\            .        /_' 
#       ;+,           :       |\8
#         '.`>+.     _./'_/2/b/_
#          '-oh\._.._j:;'`P;8/,
#             `'->:o:.:src/='
#                     : 
#                     :    http://thedu.us/scripts/present-file/present-file 
#</tt>                .    Last invoked: Feb 26, 2009, when duus was feeling pleased.
#-------------------------- 

