{"action":"created","comment":{"url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/comments/35163864","id":35163864,"diff_hunk":"@@ -60,24 +60,24 @@ initialize () {\n         cabal sandbox ${SANDBOX:-} init\n     }\n \n-    [ ! -f \"$project.submodules\" ] || {\n-        # submodules initialized if required, the \"has it been done before\" is pretty crude, but check is useful.\n-        cat $project.submodules | while read submodule; do\n-            if [ -d \"$submodule\" ]; then\n-               find \"$submodule\" -maxdepth 2 -name \\*.cabal\n-            fi\n-        done | grep -q . || (\n-            cd $(git rev-parse --show-toplevel)\n-            git submodule init\n-            git submodule update\n-        )\n+    for submodule in $(find lib -maxdepth 4 ! -path \"lib/*/bin/*\" -name \\*.cabal | sed 's/[^\\/]*$//g'| sed 's/\\/$//g');\n+    do\n+        if [ -d \"$submodule\" ]; then\n+           find \"$submodule\" -maxdepth 2 -name \\*.cabal\n+        fi\n+    done | grep -q . || (\n+        cd $(git rev-parse --show-toplevel)\n+        git submodule init\n+        git submodule update\n+    )\n+\n+    for submodule in $(find lib -maxdepth 4 ! -path \"lib/*/bin/*\" -name \\*.cabal | sed 's/[^\\/]*$//g'| sed 's/\\/$//g');","path":"src/cabal","position":26,"original_position":26,"commit_id":"647b9dbd17b27977508e6bc6cedb431a509e118b","original_commit_id":"647b9dbd17b27977508e6bc6cedb431a509e118b","user":{"login":"michaelneale","id":14976,"avatar_url":"https://avatars.githubusercontent.com/u/14976?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelneale","html_url":"https://github.com/michaelneale","followers_url":"https://api.github.com/users/michaelneale/followers","following_url":"https://api.github.com/users/michaelneale/following{/other_user}","gists_url":"https://api.github.com/users/michaelneale/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelneale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelneale/subscriptions","organizations_url":"https://api.github.com/users/michaelneale/orgs","repos_url":"https://api.github.com/users/michaelneale/repos","events_url":"https://api.github.com/users/michaelneale/events{/privacy}","received_events_url":"https://api.github.com/users/michaelneale/received_events","type":"User","site_admin":false},"body":"thanks @fractalcat I knew you would come up with something - perfect. ","created_at":"2015-07-21T22:47:46Z","updated_at":"2015-07-21T22:47:46Z","html_url":"https://github.com/ambiata/cabal-extras/pull/39#discussion_r35163864","pull_request_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/comments/35163864"},"html":{"href":"https://github.com/ambiata/cabal-extras/pull/39#discussion_r35163864"},"pull_request":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39","id":40428232,"html_url":"https://github.com/ambiata/cabal-extras/pull/39","diff_url":"https://github.com/ambiata/cabal-extras/pull/39.diff","patch_url":"https://github.com/ambiata/cabal-extras/pull/39.patch","issue_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/39","number":39,"state":"open","locked":false,"title":"use a deep find to work out submodules vs use a file","user":{"login":"michaelneale","id":14976,"avatar_url":"https://avatars.githubusercontent.com/u/14976?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelneale","html_url":"https://github.com/michaelneale","followers_url":"https://api.github.com/users/michaelneale/followers","following_url":"https://api.github.com/users/michaelneale/following{/other_user}","gists_url":"https://api.github.com/users/michaelneale/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelneale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelneale/subscriptions","organizations_url":"https://api.github.com/users/michaelneale/orgs","repos_url":"https://api.github.com/users/michaelneale/repos","events_url":"https://api.github.com/users/michaelneale/events{/privacy}","received_events_url":"https://api.github.com/users/michaelneale/received_events","type":"User","site_admin":false},"body":"@charleso FYI here is a version of the change using find","created_at":"2015-07-21T07:07:21Z","updated_at":"2015-07-21T22:47:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"228cc07f107f423fd5b9d0af315543a2ea2b13bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39/commits","review_comments_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39/comments","review_comment_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/39/comments","statuses_url":"https://api.github.com/repos/ambiata/cabal-extras/statuses/647b9dbd17b27977508e6bc6cedb431a509e118b","head":{"label":"ambiata:topic/no-more-project-dot-submodules","ref":"topic/no-more-project-dot-submodules","sha":"647b9dbd17b27977508e6bc6cedb431a509e118b","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":32421809,"name":"cabal-extras","full_name":"ambiata/cabal-extras","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/cabal-extras","description":"Haskell project bootstrap.","fork":false,"url":"https://api.github.com/repos/ambiata/cabal-extras","forks_url":"https://api.github.com/repos/ambiata/cabal-extras/forks","keys_url":"https://api.github.com/repos/ambiata/cabal-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/cabal-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/cabal-extras/teams","hooks_url":"https://api.github.com/repos/ambiata/cabal-extras/hooks","issue_events_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/cabal-extras/events","assignees_url":"https://api.github.com/repos/ambiata/cabal-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/cabal-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/cabal-extras/tags","blobs_url":"https://api.github.com/repos/ambiata/cabal-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/cabal-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/cabal-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/cabal-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/cabal-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/cabal-extras/languages","stargazers_url":"https://api.github.com/repos/ambiata/cabal-extras/stargazers","contributors_url":"https://api.github.com/repos/ambiata/cabal-extras/contributors","subscribers_url":"https://api.github.com/repos/ambiata/cabal-extras/subscribers","subscription_url":"https://api.github.com/repos/ambiata/cabal-extras/subscription","commits_url":"https://api.github.com/repos/ambiata/cabal-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/cabal-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/cabal-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ambiata/cabal-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/cabal-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/cabal-extras/merges","archive_url":"https://api.github.com/repos/ambiata/cabal-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/cabal-extras/downloads","issues_url":"https://api.github.com/repos/ambiata/cabal-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/cabal-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/cabal-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/cabal-extras/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/cabal-extras/releases{/id}","created_at":"2015-03-17T21:37:22Z","updated_at":"2015-06-07T03:05:01Z","pushed_at":"2015-07-21T07:07:21Z","git_url":"git://github.com/ambiata/cabal-extras.git","ssh_url":"git@github.com:ambiata/cabal-extras.git","clone_url":"https://github.com/ambiata/cabal-extras.git","svn_url":"https://github.com/ambiata/cabal-extras","homepage":"","size":314,"stargazers_count":3,"watchers_count":3,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":3,"default_branch":"master"}},"base":{"label":"ambiata:master","ref":"master","sha":"1aede3060a2589311f4e25c9dc75905302038081","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":32421809,"name":"cabal-extras","full_name":"ambiata/cabal-extras","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/cabal-extras","description":"Haskell project bootstrap.","fork":false,"url":"https://api.github.com/repos/ambiata/cabal-extras","forks_url":"https://api.github.com/repos/ambiata/cabal-extras/forks","keys_url":"https://api.github.com/repos/ambiata/cabal-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/cabal-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/cabal-extras/teams","hooks_url":"https://api.github.com/repos/ambiata/cabal-extras/hooks","issue_events_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/cabal-extras/events","assignees_url":"https://api.github.com/repos/ambiata/cabal-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/cabal-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/cabal-extras/tags","blobs_url":"https://api.github.com/repos/ambiata/cabal-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/cabal-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/cabal-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/cabal-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/cabal-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/cabal-extras/languages","stargazers_url":"https://api.github.com/repos/ambiata/cabal-extras/stargazers","contributors_url":"https://api.github.com/repos/ambiata/cabal-extras/contributors","subscribers_url":"https://api.github.com/repos/ambiata/cabal-extras/subscribers","subscription_url":"https://api.github.com/repos/ambiata/cabal-extras/subscription","commits_url":"https://api.github.com/repos/ambiata/cabal-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/cabal-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/cabal-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/cabal-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ambiata/cabal-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/cabal-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/cabal-extras/merges","archive_url":"https://api.github.com/repos/ambiata/cabal-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/cabal-extras/downloads","issues_url":"https://api.github.com/repos/ambiata/cabal-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/cabal-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/cabal-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/cabal-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/cabal-extras/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/cabal-extras/releases{/id}","created_at":"2015-03-17T21:37:22Z","updated_at":"2015-06-07T03:05:01Z","pushed_at":"2015-07-21T07:07:21Z","git_url":"git://github.com/ambiata/cabal-extras.git","ssh_url":"git@github.com:ambiata/cabal-extras.git","clone_url":"https://github.com/ambiata/cabal-extras.git","svn_url":"https://github.com/ambiata/cabal-extras","homepage":"","size":314,"stargazers_count":3,"watchers_count":3,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39"},"html":{"href":"https://github.com/ambiata/cabal-extras/pull/39"},"issue":{"href":"https://api.github.com/repos/ambiata/cabal-extras/issues/39"},"comments":{"href":"https://api.github.com/repos/ambiata/cabal-extras/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ambiata/cabal-extras/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/ambiata/cabal-extras/statuses/647b9dbd17b27977508e6bc6cedb431a509e118b"}}}}