Self-updating Bash Script Revised

Sunday, February 26th, 2012

I recently posted an approach for a self-updating bash script. Shortly after using it in production, I noticed a critical shortcoming. Due to the simple way in which I implemented my update checking (an MD5 sum over the script itself), changes to the script interpreter line (aka shebang) would cause the script to output that [...]

Safely updating TYPO3 extensions

Wednesday, February 22nd, 2012

A difference between the originally installed version and the current was detected! If you have ever read that warning in the TYPO3 extension manager, you know exactly how annoying it can be to find that difference. You made some minor tweak or fix and forgot about it and now you don’t know what it was [...]

Integrate Progress Indicator in Console Output

Wednesday, January 4th, 2012

I recently tried to use pv in a bash script so that it wouldn’t interfere with my concept of communicating overall progress to the user. When I usually like to do is to echo -n a description of the current task and then later echo either “Done.” or “Failed!” (or something similar). Obviously, that somewhat [...]

Check Write Permissions for Folder Hierachcy

Monday, January 2nd, 2012

While working on a bash script, I wanted to check if I could rm -rf a folder before actually attempting it and flushing the console with tons of write permission error messages. Upon failing to find what I wanted online, I constructed this beauty: find . \( -exec test -w {} \; -o \( -exec [...]

Self-updating Bash Script

Thursday, December 22nd, 2011

Note: There is a revised version of this script available. While working on the typo3scripts project, I wanted to implement a self-updating feature into each of the scripts as that seemed most convenient for where these scripts would be used. My initial approach was OK but left me wondering. So, here is the revised approach [...]