aur/playdate-sdk.install
2022-03-17 20:38:29 +01:00

38 lines
1.1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

post_install() {
echo >&2 'Installing icon set'
find /opt/playdate-sdk/Resources/file-icon -name '*.png' -exec \
bash -c '
basename="$(basename -s .png "$1")"
xdg-icon-resource install --mode system --context mimetypes \
--size "${basename#data-}" "$1" application-x-playdate' \
_ '{}' ';'
if [[ -x /usr/bin/zeal ]]; then
echo >&2
echo >&2 'To install Playdate SDKs docset into Zeal, run:'
echo >&2
printf >&2 ' cp -r -t %s %s\n' \
'"${XDG_DATA_HOME:-"${HOME}/.local/share"}/Zeal/Zeal/docsets/"' \
'/opt/playdate-sdk/PlaydateSDK.docset'
fi
echo >&2
echo >&2 'Before you use the SDK, run this on your user account:'
echo >&2
echo >&2 ' mkdir -p "${XDG_DATA_HOME:-"${HOME}/.local/share"}/playdate-sdk"'
echo >&2 ' cp -rvt "${XDG_DATA_HOME:-"${HOME}/.local/share"}/playdate-sdk" /opt/playdate-sdk/{bin,Disk,Examples}'
}
post_upgrade() {
post_install
}
post_remove() {
echo >&2
echo >&2 'To remove all traces from your user account, remove the'
echo >&2 'following directories:'
echo >&2
printf >&2 ' %s\n' \
'~/.local/share/playdate-sdk' \
'~/.Playdate\ Simulator'
}