Commit 5cb23e4c authored by Eli Schwartz's avatar Eli Schwartz Committed by Christian Hesse
Browse files

update-keys: don't restore cwd in a subprocess



Using popd at the very end of a shell script is unnecessary, because, as
the very last command, there is nothing to restore state for.
Immediately after, the shell subprocess is ended, and processes don't
control the cwd of the parent process. Changing the cwd for the last
microsecond of the shell process, during which no commands are run, is
a mildly expensive no-op.

By the same measure, if popd is never used, pushd is not needed to
record the old cwd. So simply use 'cd'.

Signed-off-by: Christian Hesse's avatarChristian Hesse <mail@eworm.de>
parent c4264b67
......@@ -21,7 +21,7 @@ armor
no-emit-version
__EOF__
pushd "$(dirname "$0")" >/dev/null
cd "$(dirname "$0")"
"${GPG[@]}" --gen-key <<EOF
%echo Generating Arch Linux keyring temporary master key...
......@@ -91,5 +91,3 @@ while read -ra data; do
done < packager-revoked-keyids
cat master/*.asc master-revoked/*.asc packager/*.asc packager-revoked/*.asc > archlinux.gpg
popd >/dev/null
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment