{"id":170,"date":"2020-04-07T16:17:35","date_gmt":"2020-04-07T16:17:35","guid":{"rendered":"http:\/\/metajack.org\/blog\/?p=170"},"modified":"2020-04-07T16:23:01","modified_gmt":"2020-04-07T16:23:01","slug":"todays-lesson-make-use-of-package-managers","status":"publish","type":"post","link":"https:\/\/metajack.org\/blog\/2020\/04\/07\/todays-lesson-make-use-of-package-managers\/","title":{"rendered":"Today&#8217;s lesson: Make use of package managers"},"content":{"rendered":"\n<p>I needed to distribute, backup and install some files to a large number of servers today. I had wrote most of a small script when I was reminded of a maxim that I often forget: Make use of package managers.<\/p>\n\n\n\n<p>Everything my script did a package manager would do much better. The quickest way to create a simple package (an rpm in my case) is to simply tar up the files that need distributed (with all ownership and permissions set) then use a tool like tar2rpm.sh to create an rpm. You can use similar tools for the package manager of your choice.<\/p>\n\n\n\n<p>Before I was reminded to use a package manager I was quite content writing my little script, refining it and admiring my handiwork. I reflected some on the writing of scripts &#8211; my thoughts :<\/p>\n\n\n\n<p> Writing scripts &#8211; ideally elegant ones &#8211; is a good bit of art and creativity to inject into the technical world of system administration and development. It is nearly alway worth the time.<\/p>\n\n\n\n<p> I was also reminded to stop judging other people&#8217;s scripts &#8211; I don&#8217;t really judge per se, but I do tend at times to slightly frown upon someone else&#8217;s method of writing something. The cause of course is the very thing that can make a script elegant &#8211; readability versus cleverness. Too much cleverness can be annoying. No cleverness &#8211; the same. I need to give other people&#8217;s cleverness a bit more time before marking it as unnecessarily obtuse. The same goes for scripts that are a bit too verbose (a more rare issue).<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to distribute, backup and install some files to a large number of servers today. I had wrote most of a small script when I was reminded of a maxim that I often forget: Make use of package managers. Everything my script did a package manager would do much better. The quickest way to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/metajack.org\/blog\/2020\/04\/07\/todays-lesson-make-use-of-package-managers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Today&#8217;s lesson: Make use of package managers&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,2],"tags":[],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-programming","category-sysadmin","entry"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":5,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":175,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions\/175"}],"wp:attachment":[{"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metajack.org\/blog\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}