This document contains important information to help get you started in modifying ESPL and LVS Web pages. This document is organized into three sections:
The first section describes how files are layed out in our directory that contains the master copy of the Web pages:
The second section gives a step-by-step guide to editing a text file under RCS. It also includes the contents of a couple of script files that I use to save keystrokes when I'm editing under RCS. This stuff was hard for me to get used to, but once you see how it works a couple of times it's certainly not difficult.
The third section describes the process for making modifications to your Web pages and installing those modifications. It contains two examples: changing the link from the ESPL/LVS page to your main page. For LVS users, it also includes information on adding a subdirectory under your user directory. Adding a subdirectory is probably the most complicated thing you might want to do, and probably isn't necessary for most people. However, if you plan on having a really elaborate web presence, then you might need subdirectories to keep everything organized.
[ Top | Directory Structure | RCS | Examples ]
As mentioned above, the http documents for the labs are kept in
In this directory you will find the top level Makefile, the index.html file, which is the entry point to the lab's web pages, and install.mk, which is a make include file.
In addition to these files, the LVS directory structure contains the following subdirectories:
If you take a look at the Makefile for both ESPL and LVS, you will see that it contains four important things: a target directory to install into, a list of subdirectories to recursively install, a list of files in this directory to install, and the line that includes the install.mk file. The install.mk file contains the rules for installing documents to the target directory, and it will never need to be edited. The Makefile, on the other hand, will need to be updated any time a new file or subdirectory is added to the directory in which it exists.
Since the members directory is the one that most everyone in LVS will be concerned with, and because it is the most complex, we will consider its structure next. In the members directory, everyone has a subdirectory where their pages will reside. The only file in this directory is the Makefile. It is very similar in content to the top level Makefile described above. The only differences are that it doesn't list any files to install (since there aren't any), the relative path to install.mk is slightly different, and the target directory is given relative to the directory in the top level Makefile. Since this file already lists everyone's subdirectory, it will not need to be modified until new users are added.
Continuing down the directory tree, we enter a particular user's directory. Each user has a Makefile and an RCS subdirectory in their directory, along with any other files he may need for his web page. The Makefile must list every file that the user wants to be visible from the web. This is because if it's not listed in the Makefile, then it won't be installed in the protected web server directories.
To summarize the installation process, when you type make install in the directory with the top level Makefile in it, the Makefile installs all of the listed files to the target location at the web server directories, then calls the Makefile in each of its listed subdirectories. The Makefile in each subdirectory does the same, and thus, every file that has been changed or added since the last make install will be copied to its correct location.
[ Top | Directory Structure | RCS | Examples ]
Changing any text file under Revision Control System (RCS) is a four step process:
It's best to try to get all your editing done at once, rather than incrementally, since each time you want to edit a file, you have to go through all four steps.
Since the first two steps and the last two steps almost always happen together, I wrote a couple of scripts to speed things up. Here's the script that performs the first two steps:
#! /bin/sh
#
# ~/bin/covi
#
# This script is for checking out a copy of a file under RCS and vi'ing it
#
#
if test -z "$1"
then
echo "USAGE: "
echo "$0 filename_to_checkout_and_edit"
exit
else
if /usr/local/gnu/bin/co -l $1
then
vi $1
else
echo co FAILED
fi
fi
And here is a script that combines the last two steps:
#! /bin/sh
#
# ~/bin/cico
#
# This script is for checking in your copy of a file to RCS and
# co'ing a read only copy
#
#
if test -z "$1"
then
echo "USAGE: "
echo "$0 file_to_checkin_and_checkout"
exit
else
if /usr/local/gnu/bin/ci $1
then
/usr/local/gnu/bin/co $1
else
echo ci FAILED
fi
fi
If you put these in one of your directories in your path and make sure they're executable, you can save yourself a lot of unnecessary typing.
[ Top | Directory Structure | RCS | Examples ]
This section is just a quick walk-through of two things you might want to do when working on your web page. The first is simply changing the file linked to your name on the ESPL or LVS page. The second is adding a subdirectory under your directory in members. This second example is primarily to illustrate how to set up the makefiles. If you need a subdirectory in your members directory, your page is probably too complicated. This section assumes that you have read the previous sections and you know HTML.
Suppose you want to change your main page from user_old.html to user.html. There are four things that you have to do:
Suppose you need a subdirectory under your members/user directory to keep additional HTML files separate from your main pages. What follows are the steps you would need to take. Remember, any time the step requires you to change a file, you must go through the procedure described in Changing Your Files Under RCS.
That ought to get you going. If you think about why the above procedures work, you should be able to figure out how to do just about anything you want to do. If you have any questions or suggestions, feel free to email me (dave@vision).
[ Top | Directory Structure | RCS | Examples ]