nixpkgs-suyu/maintainers/scripts
Erik Arvstedt 3f54dfa475
treewide: fix bash exit handlers
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.
2022-07-02 16:13:12 +02:00
..
doc
haskell maintainers/scripts/haskell/hydra-report.hs: remove redundant pragmas 2022-05-20 21:41:30 +02:00
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 stdenv, dep-licenses.sh: do not skip handling of other exit traps 2022-02-20 16:27:24 +01:00
eval-release.nix
eval-release.sh
feature-freeze-teams.pl Add a list of subsystem maintainers for release 2022-03-30 10:32:53 +02:00
fetch-kde-qt.sh
find-tarballs.nix
fix-maintainers.pl maintainers/fix-maintainers.pl: init 2022-06-29 00:52:11 +02:00
hydra-eval-failures.py
hydra_eval_check
luarocks-config.lua update-luarocks-package: fix mirrors 2022-06-13 11:17:36 +02:00
luarocks-packages.csv luaPackages.sqlite: init at v1.2.2-0 2022-06-18 21:23:45 +02:00
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 treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
pluginupdate.py vim/update.py: distinguish between vim/neovim plugins 2022-05-03 00:22:03 +02:00
rebuild-amount.sh treewide: fix bash exit handlers 2022-07-02 16:13:12 +02:00
remove-old-aliases.py maintainers/scripts/remove-old-aliases.py: add option to only operate on 2022-03-27 19:47:48 +03:00
update-channel-branches.sh
update-luarocks-packages luaPackages.luv: fix build 2022-06-13 11:17:36 +02:00
update-luarocks-shell.nix
update-python-libraries
update-redirected-urls.sh
update-ruby-packages
update.nix gnome.updateScript: Use experimental support for custom commit messages 2022-02-21 19:12:35 +01:00
update.py maintainers/scripts/update.nix: Add experimental support for customizing commit message 2022-02-21 19:12:35 +01:00
vanity-manual-equalities.txt
vanity.sh