Click the box titles below to expand:
How to's
XSLT
GOOGLE MAPS API
PHP
- PHP & Web Services — using SOAP to get meteorological data for a location
- PHP and Flickr accessing online photos through the phpFlickr class
Perl
Document Object Model (DOM)
UNIX
- Various snippets that make my life easier
- Create an Antelope Mail Archive
- Adding new projects to the Antelope contrib area using CVS
- Using Subversion to version control web sites
Generic Mapping Tools (GMT)
Miscellaneous
Projects
Courses Taught
Latest Favorites
- Make your pages load faster by combining and compressing javascript and css files
- Creating Liquid Faux Columns
- Setting up SSL under Apache 2 on SuSE
- PHP editing with ViM
- Getting equal-height columns in a three-column layout
- Star html Selector Bug
- Reset MySQL root account permissions
- How to write UNIX man pages
- Son of Suckerfish Dropdowns
- Aidan's PHP Repository
- Adium IM client
- ShapeShifter
- Install wiki on an iBook
- Quirksmode
- PHP
- GD
- JpGraph
- Vim Text Editor
- Generic Mapping Tools (GMT)
Mac OS X
Web Development
Beta
How To :: Adding new projects to the Antelope contrib area using CVS
1. Tools for the job
Obviously you need a CVS client to run this stuff! Most of our hosts have this already set up, so I didn't have to worry about this. You will need a CVS repository (server) and a client to add projects....
2. Setting up your home area to be able to add projects
First up create a sandbox and get the contrib directory:
hostname {username} %1> cd
hostname {username} %2> mkdir sandbox
Then make sure you have an environmental variable set for the CVS root (or server):
hostname {username} %1> cd
hostname {username} %3> setenv CVSROOT username@cvsrepositoryserver:/opt/antelope/cvs
3. Get your own copy of the contributed code
Next, go and get all the projects on the server. These will be your local copies to play with in your sandbox:
hostname {username} %4> cd sandbox/
hostname {username} %5> cvs checkout contrib
Go to the directory where you want to add your projects to, and copy them into the directory, or start creating them:
hostname {username} %6> cd contrib/www/
hostname {username} %7> cp -r /path/to/my/project/rtimbank .
4. Make sure you create a manpage!
Every library or application you create MUST have a manpage!
hostname {username} %8> manpage > rtimbank.3h
Make sure you delete all lines beginning with "#" (comment lines). Also delete the `\"te line.
5. Check your man page to see if the nroff formatting worked
Man pages are formatted with the bizarre and archaic nroff code. To make sure your man page looks okay there are a couple of things you can do.
(1) run fixman — a little known (to me anyway!) utility that will look over your man page and report (sometimes fix) problems. It creates a new man page for you, replacing your man page, and renaming the old man page as manpage.3h-
hostname {username} %8> fixman rtimbank.3h
hostname {username} %9> ls -l rtimbank.3h*
-rw-r--r-- 1 rnewman users 1175 2005-07-28 16:24 rtimbank.3h
-rw-r--r-- 1 rnewman users 1175 2005-07-28 16:20 rtimbank.3h-
(2) as you are viewing/writing your man page you can view how it will look as a man page by using the nroff command which emulates nroff. This script is designed for use with man(1):
hostname {username} %10> nroff -man rtimbank.3h | more
6. Add & commit your code
Have a look and see if everything is there before you add and commit:
hostname {username} %8> ls -l rtimbank
total 44
drwxr-xr-x 3 rnewman users 4096 2005-07-28 16:18 css
drwxr-xr-x 3 rnewman users 4096 2005-07-28 16:18 images
-rw-r--r-- 1 rnewman users 262 2005-07-28 16:13 Makefile
-rw-r--r-- 1 rnewman users 1175 2005-07-28 16:24 rtimbank.3h
-rw-r--r-- 1 rnewman users 2601 2005-07-28 16:13 rtimbank.pf
-rwxr-xr-x 1 rnewman users 17607 2005-07-28 16:13 rtimbank.wphp
Go into all the directories and add the files:
hostname {username} %9> cd css
hostname {username} %10> cvs add *
hostname {username} %11> cd ../images/
hostname {username} %12> cvs add *
hostname {username} %13> cd ../
hostname {username} %14> cvs add *
Check you have added all you wanted to with cvs status:
hostname {username} %15> cvs status
Commit the files with cvs commit:
hostname {username} %16> cvs commit
7. Make sure your code is working by doing cvs update and a make install
hostname {username} %17> cd /path/to/the/contributed/code/www
hostname {username} %18> cvs -d -P .
hostname {username} %19> make
hostname {username} %20> make install
If you can't make install...
Switch user to a user that you know has permission to write to the core man pages and Antelope distribution!
9. Sit back and have a beer – you have worked hard....
Disclaimer
This information is freely provided as–is. Messing around with the command line and creating files is a serious business, and I accept no liability for errors created, systems corrupted, or hard–disk damage by you following these instructions. They worked for me but may not work for you. Remember to back–up EVERYTHING before you try any of this stuff — it is not simple OR easy!!!
If you have any questions about this please email me at rlnewman@ucsd.edu and I will try my best to help you out.