I would like to trace a shell script for debugging purposes without having to modify its source code (e.g. change the shebang or insert a set -x at the beginning). It is a dpkg postinst script, so not actually called by myself on the shell.
In hope of finding an environment variable for this I searched the man page for dash, but could not find anything.
Is there some way to do this?
debfile. It's easy in Emacs (installdebian-el); or manually: extract the archive withar x, extract the control file withtar x, edit the postinst script, and repack withtar czandar r. – Gilles Jan 12 '12 at 18:05