2010-11-14 18:44:24 +00:00
|
|
|
{- git-annex upgrade support
|
|
|
|
-
|
|
|
|
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Upgrade where
|
|
|
|
|
2011-10-05 20:02:51 +00:00
|
|
|
import Common.Annex
|
2011-10-04 04:40:47 +00:00
|
|
|
import Annex.Version
|
2011-03-16 05:23:20 +00:00
|
|
|
import qualified Upgrade.V0
|
|
|
|
import qualified Upgrade.V1
|
2011-06-22 21:51:48 +00:00
|
|
|
import qualified Upgrade.V2
|
2010-11-14 18:44:24 +00:00
|
|
|
|
|
|
|
upgrade :: Annex Bool
|
2012-01-10 19:36:54 +00:00
|
|
|
upgrade = go =<< getVersion
|
|
|
|
where
|
|
|
|
go (Just "0") = Upgrade.V0.upgrade
|
|
|
|
go (Just "1") = Upgrade.V1.upgrade
|
|
|
|
go (Just "2") = Upgrade.V2.upgrade
|
|
|
|
go _ = return True
|