aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-lib.in
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-05-12 08:30:14 +0000
committermerakor <cem@ckyln.com>2021-05-12 08:30:14 +0000
commitba98f20b2e4c5e81e61a16f1ff8869831078f0d3 (patch)
tree20059e495d4fead4a0e58c9305f1819684f32f2d /src/cpt-lib.in
parent0b445ff6f8d96b59a72ef16c5350ff4be9593312 (diff)
downloadcpt-ba98f20b2e4c5e81e61a16f1ff8869831078f0d3.tar.gz
main(): fix $pid naming location.
FossilOrigin-Name: cac0d2ddb5a2e8e68871a5d5f8cbb90ea97c5289527467fcf24d45a3f018a958
Diffstat (limited to 'src/cpt-lib.in')
-rw-r--r--src/cpt-lib.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 930c426..d6fa0a4 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1989,6 +1989,12 @@ create_cache() {
eval set -- "$REST"
}
+ # The PID of the current shell process is used to isolate directories
+ # to each specific CPT instance. This allows multiple package manager
+ # instances to be run at once. Store the value in another variable so
+ # that it doesn't change beneath us.
+ pid=${CPT_PID:-$$}
+
# Create the cache directories for CPT and set the variables which point
# to them. This is seperate from temporary directories created in
# create_cache(). That's because we need these variables set on most
@@ -2008,12 +2014,6 @@ create_cache() {
# Set the location to the repository and package database.
pkg_db=var/db/cpt/installed
- # The PID of the current shell process is used to isolate directories
- # to each specific CPT instance. This allows multiple package manager
- # instances to be run at once. Store the value in another variable so
- # that it doesn't change beneath us.
- pid=${CPT_PID:-$$}
-
# Force the C locale to speed up things like 'grep' which disable unicode
# etc when this is set. We don't need unicode and a speed up is always
# welcome.