3f54dfa475
Transform exit handlers of the form trap cleanup EXIT [INT] [TERM] [QUIT] [HUP] [ERR] (where cleanup is idempotent) to trap cleanup EXIT This fixes a common bash antipattern. Each of the above signals causes the script to exit. For each signal, bash first handles the signal by running `cleanup` and then runs `cleanup` again when handling EXIT. (Exception: `vscode/*` prevents the second run of `cleanup` by removing the trap in cleanup`). Simplify the cleanup logic by just trapping exit, which is always run when the script exits due to any of the above signals. Note: In case of borgbackup, the exit handler is not idempotent, but just trapping EXIT guarantees that it's only run once. |
||
---|---|---|
.. | ||
doc | ||
haskell | ||
all-tarballs.nix | ||
build.nix | ||
check-hydra-by-maintainer.nix | ||
check-maintainer-github-handles.sh | ||
copy-tarballs.pl | ||
db-to-md.sh | ||
debian-patches.sh | ||
dep-licenses.sh | ||
eval-release.nix | ||
eval-release.sh | ||
feature-freeze-teams.pl | ||
fetch-kde-qt.sh | ||
find-tarballs.nix | ||
fix-maintainers.pl | ||
hydra-eval-failures.py | ||
hydra_eval_check | ||
luarocks-config.lua | ||
luarocks-packages.csv | ||
nix-call-package | ||
nix-diff.sh | ||
nix-generate-from-cpan.nix | ||
nix-generate-from-cpan.pl | ||
nixpkgs-lint.nix | ||
nixpkgs-lint.pl | ||
patchelf-hints.sh | ||
pluginupdate.py | ||
rebuild-amount.sh | ||
remove-old-aliases.py | ||
update-channel-branches.sh | ||
update-luarocks-packages | ||
update-luarocks-shell.nix | ||
update-python-libraries | ||
update-redirected-urls.sh | ||
update-ruby-packages | ||
update.nix | ||
update.py | ||
vanity-manual-equalities.txt | ||
vanity.sh |