Skip to content

Commit

Permalink
change Linux lock directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiksalvet committed Nov 21, 2024
1 parent a6749f2 commit 541fafb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

The changes not yet present in any release are listed in this section.

### Changed

* For Linux, changed the lock directory base from `/var/lock` to `/tmp`.

## 1.1.0 (2021-08-17)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Dominik Salvet
Copyright (c) 2019-2024 Dominik Salvet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 11 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ GitPack not only saves time for end-users to figure out how to install a Git pro
## Table of Contents

* [Requirements](#requirements)
* [Installation](#installation)
* [Usage](#usage)
* [Examples](#examples)
* [For Developers](#for-developers)
* [Badge](#badge)
* [Useful Resources](#useful-resources)
- [GitPack](#gitpack)
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [For Developers](#for-developers)
- [Badge](#badge)
- [Useful Resources](#useful-resources)

## Requirements

Expand Down Expand Up @@ -144,12 +146,12 @@ github.com/dominiksalvet/ux430ua-jack-volume 208f1a7bce8644482abdfa14107f90358a7
$ gitpack paths
state-dir /home/dominik/.local/share/gitpack
cache-dir /home/dominik/.cache/gitpack
lock-path /var/lock/gitpack-1000
lock-path /tmp/gitpack-1000.lock
$ sudo gitpack paths
state-dir /var/lib/gitpack
cache-dir /var/cache/gitpack
lock-path /var/lock/gitpack-0
lock-path /tmp/gitpack-0.lock
```

> Did you know that **GitPack has sleek tab completion** for Bash shells?
Expand Down
4 changes: 2 additions & 2 deletions src/gitpack
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#-------------------------------------------------------------------------------
# Copyright 2019-2022 Dominik Salvet
# Copyright 2019-2024 Dominik Salvet
# https://github.com/dominiksalvet/gitpack
#-------------------------------------------------------------------------------
# This is GitPack, a simple Git-based package manager. It is particularly useful
Expand Down Expand Up @@ -307,7 +307,7 @@ init_linux_paths() {
readonly STATE_DIR=/var/lib/gitpack
readonly CACHE_DIR=/var/cache/gitpack
fi
readonly LOCK_DIR=/var/lock # unified storage for locks
readonly LOCK_DIR=/tmp
}

init_macos_paths() {
Expand Down
4 changes: 2 additions & 2 deletions test/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#-------------------------------------------------------------------------------
# Copyright 2019-2021 Dominik Salvet
# Copyright 2019-2024 Dominik Salvet
# https://github.com/dominiksalvet/gitpack
#-------------------------------------------------------------------------------
# Initializes test environment and runs all GitPack tests. The current working
Expand Down Expand Up @@ -68,7 +68,7 @@ case "$system" in
export GLOBAL_STATE_DIR=/var/lib/gitpack
export LOCAL_CACHE_DIR="$HOME/.cache/gitpack"
export GLOBAL_CACHE_DIR=/var/cache/gitpack
export LOCK_DIR=/var/lock
export LOCK_DIR=/tmp
;;
Darwin) export LOCAL_STATE_DIR="$HOME/.local/share/gitpack"
export GLOBAL_STATE_DIR=/var/lib/gitpack
Expand Down

0 comments on commit 541fafb

Please sign in to comment.