Skip to content

Commit

Permalink
Test cleaning up /opt/homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Jul 3, 2024
1 parent c040148 commit 29b6d3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ endgroup


begingroup "Uninstalling Homebrew"
# Move directories to /opt/off
# Move directories to /opt/*-off
echo "Moving directories..."
sudo mkdir /opt/off
/usr/bin/sudo /usr/bin/find /usr/local -mindepth 1 -maxdepth 1 -type d -print -exec /bin/mv {} /opt/off/ \;
sudo mkdir /opt/local-off /opt/homebrew-off
test ! -d /usr/local || /usr/bin/sudo /usr/bin/find /usr/local -mindepth 1 -maxdepth 1 -type d -print -exec /bin/mv {} /opt/local-off/ \;
test ! -d /opt/homebrew || /usr/bin/sudo /usr/bin/find /opt/homebrew -mindepth 1 -maxdepth 1 -type d -print -exec /bin/mv {} /opt/homebrew-off/ \;

# Unlink files
echo "Removing files..."
/usr/bin/sudo /usr/bin/find /usr/local -mindepth 1 -maxdepth 1 -type f -print -delete
test ! -d /usr/local || /usr/bin/sudo /usr/bin/find /usr/local -mindepth 1 -maxdepth 1 -type f -print -delete
test ! -d /opt/homebrew || /usr/bin/sudo /usr/bin/find /opt/homebrew -mindepth 1 -maxdepth 1 -type f -print -delete

# Rehash to forget about the deleted files
hash -r
Expand Down
1 change: 1 addition & 0 deletions archivers/paq8/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ post-destroot {
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex "paq(8\[\\w\]+)${extract.suffix}"

0 comments on commit 29b6d3e

Please sign in to comment.