The startup script looks weird to me though. Quoting it:
> #!/bin/bash
The Kerkerkruip startup script seems to be using no bash-specific
features. I think it would be better to just use /bin/sh here.
> if [ -f "/usr/games/gargoyle" ]; then
> GAR=/usr/games/gargoyle
> else
> GAR=/usr/games/gargoyle-free
> fi
I am not sure, but I think in Debian this would be handled by the
alternatives <https://wiki.debian.org/DebianAlternatives>. Is this
correct or should a Debian package just default to gargoyle-free?
> if [ ! -d "$HOME/.kerkerkruip" ]; then
> mkdir $HOME/.kerkerkruip
> fi
> if [ ! -f "$HOME/.kerkerkruip/Kerkerkruip.gblorb" ]; then
> ln -s /usr/share/kerkerkruip/Kerkerkruip.gblorb $HOME/.kerkerkruip/Kerkerkruip.gblorb
> fi
> if [ ! -f "$HOME/.kerkerkruip/Kerkerkruip.ini" ]; then
> ln -s /usr/share/kerkerkruip/Kerkerkruip.ini $HOME/.kerkerkruip/Kerkerkruip.ini
> fi
>
> $GAR $HOME/.kerkerkruip/Kerkerkruip.gblorb
First, why the symlinking? It seems to me that the symlink will stay if
the package is uninstalled and leave a broken symlink in the user's home
directory. Is this something about gargoyle that it expects the file in
a user's home directory? Could this be fixed in Debian's gargoyle-free?
Second, I think one should use “mkdir -p” instead of checking if a
directory exists. There might exist subtle race conditions otherwise,
that are likely irrelevant in here, but might not in many other cases.
Third, $HOME is not properly quoted here. If it contains any character
in $IFS, the script will create the wrong directory and wrong symlinks.