vscode: simplify helper scripts

This simplifies the following commit.

- Remove `--` from `rm` because `$tmpDir` is guaranteed to never start
with a `-`.
We also don't use this pattern when removing tmpDirs at other places
in nixpkgs.
- Remove `unset tmpDir` because the variable `tmpDir` is never
accessed after the exit handler is run.

+3 -6
+2 -3
pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh
··· 37 37 1>&2 echo "zipStorePath='$zipStorePath'" 38 38 39 39 function rm_tmpdir() { 40 - 1>&2 printf "rm -rf -- %q\n" "$tmpDir" 41 - rm -rf -- "$tmpDir" 42 - unset tmpDir 40 + 1>&2 printf "rm -rf %q\n" "$tmpDir" 41 + rm -rf "$tmpDir" 43 42 trap - INT TERM HUP EXIT 44 43 } 45 44 function make_trapped_tmpdir() {
+1 -3
pkgs/applications/editors/vscode/extensions/cpptools/update_helper.sh
··· 44 44 45 45 46 46 function rm_tmpdir() { 47 - #echo "Removing \`tmpDir='$tmpDir'\`" 48 - rm -rf -- "$tmpDir" 49 - unset tmpDir 47 + rm -rf "$tmpDir" 50 48 trap - INT TERM HUP EXIT 51 49 } 52 50 function make_trapped_tmpdir() {