<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello List,<div class=""><br class=""></div><div class="">I thought I’d share an applescript I wrote to automatically update the tor relay software and homebrew one minute after midnight every day.</div><div class=""><br class=""></div><div class="">Here is the source code (written using AppleScript editor)</div><div class=""><br class=""></div><div class=""><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; color: rgb(1, 47, 190);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">do shell script</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> "$ which brew</span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/usr/local/bin/brew update"</span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue"; color: rgb(1, 47, 190);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">do shell script</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> "$ which brew</span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/usr/local/bin/brew upgrade tor"</span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">end</span></div></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">When it runs, it comes up with this error, saying tor is already up to date.</span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px 0px 0px 32.3px; text-indent: -32.4px; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class="">sh: $: command not found</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class="">Error: tor 0.3.2.10 already installed (1)</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class="">As this is the only error that appears, I’d take it that the script works</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class="">It can be scheduled to run automatically at midnight every night via this method I found here:</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><a href="https://apple.stackexchange.com/questions/24862/how-can-i-configure-my-computer-to-run-an-applescript-at-a-specific-time-caveat" class="">https://apple.stackexchange.com/questions/24862/how-can-i-configure-my-computer-to-run-an-applescript-at-a-specific-time-caveat</a></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal;" class="">I am curious to know what you all think of this tactic if you will, please let me know as you can give it to others if you wish. Thank you.</div></div></body></html>