Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • translations-clean-dups
  • general-refactoring-stuff
  • 81-public-key-upload-for-encrypted-email-notifications
  • 54-changing-title-of-file-page-not-possible
  • 68-allow-anonymous-bug-reports-and-feature-request-and-correct-links-in-footer
  • 80-renaming-group-search
  • 62-translations
  • 75-fix-digest-sending-logic
  • 69-create-page-link-on-my-dashboard
  • 49-send-messages-to-users-without-public-peer-profiles
  • 27-confusing-or-broken-workflow-committee-and-council-creation
  • test/mariadb
  • style/image-helper
  • 43-view-create-a-group-sometimes-displays-2-types-of-group-or-4-types-of-group
  • bugfix/fix-migrations
  • bugfix/3117-directory-order
  • bugfix/4351-faster-directory-query
  • feature/4337-castle-keys-table
  • delegation
20 results

Capfile

Blame
  • Forked from Liberate / crabgrass
    Source project has a limited visibility.
    trac.in 1.03 KiB
    # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
    # vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
    #
    # this handler will backup trac environments (based on the svn handler)
    #
    # http://trac.edgewall.com/
    #
    
    getconf src /var/lib/trac
    getconf dest /var/backups/trac
    getconf tmp /var/backups/trac.tmp
    
    cd $src
    for repo in `find . -name VERSION`
    do
       repo=`dirname $repo`
       if [ "$repo" == "." ]
       then
          repo=""
       fi
    
       # Just make the parent directory for $tmp/$repo
       parentdir=`dirname $tmp/$repo`
       ret=`mkdir -p $parentdir 2>&1`
       code=$?
       if [ "$ret" ]; then
          debug "$ret"
       fi
       if [ $code != 0 ]; then
          error "command failed mkdir -p $parentdir"
       fi
    
       ret=`trac-admin $src/$repo hotcopy $tmp/$repo 2>&1`
       code=$?
       if [ "$ret" ]; then
          debug "$ret"
       fi
       if [ $code != 0 ]; then
          error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
       fi
    done
    
    if [ -d $dest -a -d $tmp ]; then
       rm -rf $dest
    fi
    if [ -d $tmp ]; then
       mv $tmp $dest
    fi
    
    exit 0
    
    # vim: filetype=sh