Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
[preinst] breaking this a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
kirb committed Apr 14, 2018
1 parent 6389e49 commit 2fdd900
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion preinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -e

# fix my broken logic from 2.0b2…
if [[ -h /Library/TypeStatus/TypeStatus ]]; then
rm /Library/TypeStatus/TypeStatus
fi

# delete a broken symlink if necessary
if [[ -h /Library/TypeStatus && "$(readlink -q /Library/TypeStatus)" == "" ]]; then
rm /Library/TypeStatus
Expand Down Expand Up @@ -29,7 +34,7 @@ if [[ ! -d /usr/lib/TypeStatus/Providers ]]; then
fi

# if /Library/TypeStatus isn’t a symlink, make it be one now
if [[ ! -h /Library/TypeStatus ]]; then
if [[ ! -h /Library/TypeStatus && ! -d /Library/TypeStatus ]]; then
ln -s /usr/lib/TypeStatus /Library/TypeStatus
fi

Expand Down

0 comments on commit 2fdd900

Please sign in to comment.