Ignore:
Timestamp:
12/04/2006 20:38:36 (5 years ago)
Author:
ccowart
Message:

Developed the pull mechanism for confman. It's ready to go into production!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman/export.sh

    r121 r123  
    2626 
    2727REPO_URI="file://$REPO_PATH" 
     28backup=`mktemp -t confman` 
    2829 
    29 conf_export $CONF_EXPORT_FILE 
     30echo "Backing up $CONF_EXPORT_FILE" 
     31cp $CONF_EXPORT_FILE $backup 
    3032 
     33echo "Beginning export operation." >&2 
     34if ! conf_export $CONF_EXPORT_FILE ; then 
     35    echo "The export failed. Restoring $CONF_EXPORT_FILE from backup." >&2 
     36    mv $backup $CONF_EXPORT_FILE 
     37    echo "Exiting." >&2 
     38    exit 1 
     39fi 
     40echo "Export complete." >&2 
     41 
     42echo "Removing $backup" 
     43rm $backup 
     44 
Note: See TracChangeset for help on using the changeset viewer.