Skip to content

Commit 54bb2bd

Browse files
committed
Fix downloaded pkg quarantine instructions
1 parent 65e09bb commit 54bb2bd

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,18 @@ If macOS blocks an already-downloaded release package with "Apple could not veri
123123
If you trust the release and want to install it manually, remove the quarantine attribute and open it again:
124124

125125
```sh
126-
PKG="$(ls -1t ~/Downloads/DevStackMenu-*.pkg | head -n 1)"
127-
xattr -dr com.apple.quarantine "$PKG"
126+
PKG="$(find "$HOME/Downloads" -maxdepth 1 -type f -name 'DevStackMenu-*.pkg' -exec stat -f '%m %N' {} \; | sort -nr | head -n 1 | cut -d' ' -f2-)"
127+
[ -n "$PKG" ] && [ -f "$PKG" ] || { echo "DevStackMenu pkg not found in ~/Downloads" >&2; exit 1; }
128+
xattr -d com.apple.quarantine "$PKG" 2>/dev/null || xattr -c "$PKG"
128129
open "$PKG"
129130
```
130131

131132
Or install directly without Finder:
132133

133134
```sh
134-
PKG="$(ls -1t ~/Downloads/DevStackMenu-*.pkg | head -n 1)"
135-
xattr -dr com.apple.quarantine "$PKG"
135+
PKG="$(find "$HOME/Downloads" -maxdepth 1 -type f -name 'DevStackMenu-*.pkg' -exec stat -f '%m %N' {} \; | sort -nr | head -n 1 | cut -d' ' -f2-)"
136+
[ -n "$PKG" ] && [ -f "$PKG" ] || { echo "DevStackMenu pkg not found in ~/Downloads" >&2; exit 1; }
137+
xattr -d com.apple.quarantine "$PKG" 2>/dev/null || xattr -c "$PKG"
136138
sudo installer -pkg "$PKG" -target /
137139
```
138140

RELEASING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ v0.1.1
5959
- For a downloaded unsigned package, the current manual bypass is:
6060

6161
```sh
62-
PKG="$(ls -1t ~/Downloads/DevStackMenu-*.pkg | head -n 1)"
63-
xattr -dr com.apple.quarantine "$PKG"
62+
PKG="$(find "$HOME/Downloads" -maxdepth 1 -type f -name 'DevStackMenu-*.pkg' -exec stat -f '%m %N' {} \; | sort -nr | head -n 1 | cut -d' ' -f2-)"
63+
[ -n "$PKG" ] && [ -f "$PKG" ] || { echo "DevStackMenu pkg not found in ~/Downloads" >&2; exit 1; }
64+
xattr -d com.apple.quarantine "$PKG" 2>/dev/null || xattr -c "$PKG"
6465
sudo installer -pkg "$PKG" -target /
6566
```

0 commit comments

Comments
 (0)