{"id":685,"date":"2020-01-13T11:16:22","date_gmt":"2020-01-13T05:46:22","guid":{"rendered":"http:\/\/www.cyberaka.com\/?p=685"},"modified":"2020-01-13T11:16:22","modified_gmt":"2020-01-13T05:46:22","slug":"taking-backup-zip-from-multi-module-java-project","status":"publish","type":"post","link":"https:\/\/www.cyberaka.com\/?p=685","title":{"rendered":"Taking backup zip from multi-module Java project"},"content":{"rendered":"\n<p>I like to keep an archive of my code on a monthly basis. I wrote a small bash script to create zip out of my multi module Java projects. It gets the job done and can be improved to include resources and test folders as well. As of now I am only interested in the Java code zip backup.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">!\/bin\/bash\n if [ -d \"combined\" ]; then\n     echo \"Removing existing zip files in combined ..\"\n     rm combined\/*.zip\n else\n     echo \"Creating combined folder..\"\n     mkdir combined\n fi\n for d in *\/ ; do\n     if [ -d \"$d\/src\/main\/java\" ]; then\n         var=\"$(echo $d | sed 's\/.$\/\/')\"\n         echo \"Processing $var ..\"\n         cd $d\/src\/main\/java\n         zip -r ..\/..\/..\/..\/combined\/$var.zip com\n         cd ..\/..\/..\/..\n     else\n         echo \"Ignoring .. $d\"\n     fi\n done<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I like to keep an archive of my code on a monthly basis. I wrote a small bash script to create zip out of my multi module Java projects. It gets the job done and can be improved to include resources and test folders as well. As of now I am only interested in the [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,23,24],"tags":[],"class_list":["post-685","post","type-post","status-publish","format-standard","hentry","category-mac-os","category-programming","category-tips-and-tricks"],"_links":{"self":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=685"}],"version-history":[{"count":1,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/685\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}