Skip to content

Commit

Permalink
Add a comment regarding lock release
Browse files Browse the repository at this point in the history
  • Loading branch information
andsens committed Sep 4, 2023
1 parent f9225f2 commit f05ae9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Replace `bash -c ...` with `sudo bash -c ...` to install system-wide.
You can also paste this directly into a Dockerfile `RUN` command, no escaping needed.

```
wget -qO- https://raw.githubusercontent.com/orbit-online/upkg/v0.10.2/upkg.sh | (\
wget -qO- https://raw.githubusercontent.com/orbit-online/upkg/v0.11.0/upkg.sh | (\
set +e; IFS='' read -r -d $'\0' src; set -e;\
printf '%s' "$src" | shasum -a 256 -c <(printf '9864c10139a1bf681e641f669191a39697fee7e8ab885ae11f8a1bd617c677ad -');\
bash -c "set - install -g orbit-online/upkg@v0.10.2; $src")
printf '%s' "$src" | shasum -a 256 -c <(printf '30f5315b882bb2577ff783042ee75f9ed005d04a8b52ec4adc851205874e8db9 -');\
bash -c "set - install -g orbit-online/upkg@v0.11.0; $src")
```

### GitHub action
Expand Down
2 changes: 1 addition & 1 deletion upkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ upkg_install() {
exec 7<>"$deps_lock"; flock -sn 7 # Automatically released once this subshell exits
touch "$deps_sntl"
rm "$locks_acq_sntl" # All locks acquired
while [[ -e $deps_sntl ]]; do sleep .01; done )&
while [[ -e $deps_sntl ]]; do sleep .01; done )& # Release locks once all deps have finished preparing
while [[ -e $locks_acq_sntl ]]; do sleep .01; done
( [[ ! -e "$pkgpath/upkg.json" ]] || curversion=$(jq -r '.version' <"$pkgpath/upkg.json")
# Ensure deps sentinel is removed if we error out before calling upkg_install, also signal error to all other procs
Expand Down

0 comments on commit f05ae9c

Please sign in to comment.