[Swift-commit] r4123 - branches/release-0.92/bin

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Feb 19 15:45:04 CST 2011


Author: davidk
Date: 2011-02-19 15:45:03 -0600 (Sat, 19 Feb 2011)
New Revision: 4123

Modified:
   branches/release-0.92/bin/gensites
Log:
Small update to gensites usage and better handling of errors while listing templates


Modified: branches/release-0.92/bin/gensites
===================================================================
--- branches/release-0.92/bin/gensites	2011-02-19 21:29:00 UTC (rev 4122)
+++ branches/release-0.92/bin/gensites	2011-02-19 21:45:03 UTC (rev 4123)
@@ -34,7 +34,7 @@
 {
    cat << END
 
-   usage: gensites template [-p properties.file] [-L template_directory] [-h]
+   usage: gensites template [-p properties.file] [-L template_directory] [-h] [-T]
    
    template		 Name of template to use
    -p properties.file	 Specify a swift.properties to use
@@ -65,7 +65,7 @@
       -p) PROPERTIES_FILE=$2; verify_not_null properties_file $PROPERTIES_FILE; shift ;;
       -L) TEMPLATE_DIRECTORY=$2; verify_not_null template_directory $TEMPLATE_DIRECTORY; shift ;;
       -T) LIST_TEMPLATES=1 ;;
-      -h|-help) usage ;;
+      -h|-help|-?) usage ;;
        *) TEMPLATE=$1 ;;
    esac
    shift
@@ -88,12 +88,12 @@
 # List templates
 if [ ! -z "$LIST_TEMPLATES" ]; then
    # Templates in etc/sites
-   for file in `ls -1 $SWIFT_HOME/*`
+   for file in `ls -1 $SWIFT_HOME/* 2>/dev/null`
    do
 	basename $file
    done
    # Templates in .swift/sites
-   for file in `ls -1 $HOME/.swift/sites/*`
+   for file in `ls -1 $HOME/.swift/sites/* 2>/dev/null`
    do
        basename $file
    done
@@ -124,7 +124,6 @@
    fi
 fi
 
-
 # Ensure a properties file exists
 if [ ! -f "$PROPERTIES_FILE" ]; then
    PROPERTIES_FILE="swift.properties"




More information about the Swift-commit mailing list