diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-10 15:36:54 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-11 00:06:54 -0400 |
commit | abdacf58ed5d0da0439819feb669b04b2368bb92 (patch) | |
tree | 77694958b647c8015104d1d8151a744a03666070 /Upgrade.hs | |
parent | 16e7178f207b0472346c06f30aa210cebe373c36 (diff) |
tweaks
Diffstat (limited to 'Upgrade.hs')
-rw-r--r-- | Upgrade.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Upgrade.hs b/Upgrade.hs index 8b2e939dd..44ca6323e 100644 --- a/Upgrade.hs +++ b/Upgrade.hs @@ -13,12 +13,10 @@ import qualified Upgrade.V0 import qualified Upgrade.V1 import qualified Upgrade.V2 -{- Uses the annex.version git config setting to automate upgrades. -} upgrade :: Annex Bool -upgrade = do - version <- getVersion - case version of - Just "0" -> Upgrade.V0.upgrade - Just "1" -> Upgrade.V1.upgrade - Just "2" -> Upgrade.V2.upgrade - _ -> return True +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 |