root/trunk/updateServerDocs

Revision 448, 1.1 kB (checked in by Abscissa, 3 years ago)

Started a script to update server documentation.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 showUsage()
4 {
5     echo
6     echo "Usage: ./updateServerDocs {version} {optional: server ident}"
7     echo
8     echo "Example: ./updateServerDocs 0.5"
9     echo "  Will use ./serverConnect and ./serverDisconnect if available"
10     echo
11     echo "Example: ./updateServerDocs 0.5 foo"
12     echo "  Will use ./serverConnect-foo and ./serverDisconnect-foo if available"
13     echo
14     echo "You will also need to set GOLDIE_DOCS_DIR to the target directory."
15     echo "It's recommended to use sshfs to connect to the server so you can"
16     echo "set GOLDIE_DOCS_DIR and have this utility modify the server directly."
17     echo
18 }
19
20 # Check args
21 if [ "$1" = "" ] ; then
22     showUsage
23     exit
24 fi
25
26 if [ "$1" = "--help" ] ; then
27     showUsage
28     exit
29 fi
30
31 if [ "$2" = "" ] ; then
32     SUFFIX=
33 else
34     SUFFIX=-$2
35 fi
36
37 # Connect
38 if [ -e "./serverConnect$SUFFIX" ] ; then
39     . ./serverConnect$SUFFIX
40 fi
41
42 # Check GOLDIE_DOCS_DIR
43 if [ "$GOLDIE_DOCS_DIR" = "" ] ; then
44     echo "Error: GOLDIE_DOCS_DIR isn't set"
45     echo "It's recommended to set it in ./serverConnect$SUFFIX"
46     exit
47 fi
48
49
50 echo "TODO: Perform update"
51
52
53 # Disconnect
54 if [ -e "./serverDisconnect$SUFFIX" ] ; then
55     . ./serverDisconnect$SUFFIX
56 fi
Note: See TracBrowser for help on using the browser.