Android: Add .thumbnails to .gitignore when setting up a camera repository.
This commit is contained in:
parent
855021a41f
commit
0b11c71740
3 changed files with 21 additions and 5 deletions
|
@ -151,11 +151,18 @@ postFirstRepositoryR = page "Getting started" (Just Configuration) $ do
|
||||||
((res, form), enctype) <- liftH $ runFormPost $ newRepositoryForm path
|
((res, form), enctype) <- liftH $ runFormPost $ newRepositoryForm path
|
||||||
case res of
|
case res of
|
||||||
FormSuccess (RepositoryPath p) -> liftH $
|
FormSuccess (RepositoryPath p) -> liftH $
|
||||||
startFullAssistant (T.unpack p) ClientGroup
|
startFullAssistant (T.unpack p) ClientGroup Nothing
|
||||||
_ -> $(widgetFile "configurators/newrepository/first")
|
_ -> $(widgetFile "configurators/newrepository/first")
|
||||||
|
|
||||||
getAndroidCameraRepositoryR :: Handler ()
|
getAndroidCameraRepositoryR :: Handler ()
|
||||||
getAndroidCameraRepositoryR = startFullAssistant "/sdcard/DCIM" SourceGroup
|
getAndroidCameraRepositoryR =
|
||||||
|
startFullAssistant "/sdcard/DCIM" SourceGroup $ Just addignore
|
||||||
|
where
|
||||||
|
addignore = do
|
||||||
|
liftIO $ unlessM (doesFileExist ".gitignore") $
|
||||||
|
writeFile ".gitignore" ".thumbnails/*"
|
||||||
|
void $ inRepo $
|
||||||
|
Git.Command.runBool [Param "add", File ".gitignore"]
|
||||||
|
|
||||||
{- Adding a new local repository, which may be entirely separate, or may
|
{- Adding a new local repository, which may be entirely separate, or may
|
||||||
- be connected to the current repository. -}
|
- be connected to the current repository. -}
|
||||||
|
@ -315,13 +322,15 @@ driveList = return []
|
||||||
{- Bootstraps from first run mode to a fully running assistant in a
|
{- Bootstraps from first run mode to a fully running assistant in a
|
||||||
- repository, by running the postFirstRun callback, which returns the
|
- repository, by running the postFirstRun callback, which returns the
|
||||||
- url to the new webapp. -}
|
- url to the new webapp. -}
|
||||||
startFullAssistant :: FilePath -> StandardGroup -> Handler ()
|
startFullAssistant :: FilePath -> StandardGroup -> Maybe (Annex ())-> Handler ()
|
||||||
startFullAssistant path repogroup = do
|
startFullAssistant path repogroup setup = do
|
||||||
webapp <- getYesod
|
webapp <- getYesod
|
||||||
url <- liftIO $ do
|
url <- liftIO $ do
|
||||||
isnew <- makeRepo path False
|
isnew <- makeRepo path False
|
||||||
u <- initRepo isnew True path Nothing
|
u <- initRepo isnew True path Nothing
|
||||||
inDir path $ setStandardGroup u repogroup
|
inDir path $ do
|
||||||
|
setStandardGroup u repogroup
|
||||||
|
maybe noop id setup
|
||||||
addAutoStartFile path
|
addAutoStartFile path
|
||||||
setCurrentDirectory path
|
setCurrentDirectory path
|
||||||
fromJust $ postFirstRun webapp
|
fromJust $ postFirstRun webapp
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -3,6 +3,8 @@ git-annex (4.20130602) UNRELEASED; urgency=low
|
||||||
* Supports indirect mode on encfs in paranoia mode, and other
|
* Supports indirect mode on encfs in paranoia mode, and other
|
||||||
filesystems that do not support hard links, but do support
|
filesystems that do not support hard links, but do support
|
||||||
symlinks and other POSIX filesystem features.
|
symlinks and other POSIX filesystem features.
|
||||||
|
* Android: Add .thumbnails to .gitignore when setting up a camera
|
||||||
|
repository.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 10 Jun 2013 12:52:44 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 10 Jun 2013 12:52:44 -0400
|
||||||
|
|
||||||
|
|
|
@ -21,3 +21,8 @@ Install git-annex on Android and choose the defaults for a camera repository.
|
||||||
|
|
||||||
# End of transcript or log.
|
# End of transcript or log.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> I've [[done]] this, however the .gitignore file it writes will
|
||||||
|
> not actually be used by the assistant until it gets support
|
||||||
|
> for querying gitignore settings from git. There is already a
|
||||||
|
> bug tracking that, and it's in process. --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue