Shell install.sh for repository (rpi_videoloop)
Set these options at the beginning:

set -eu


so that errors fail early



Don't use sudo in a script, because it can hang when not connected to a terminal.  Possible exception: once at the beginning:

if ! test $UID -eq 0
then
   test -t 0 &amp;&amp; exec sudo "$0" "$@"
   # Not a terminal - or exec failed
   echo "Insufficient privileges - try sudo $0 $*" &gt;&amp;2
   exit 1
fi




You probably want to be using the standard install command instead of cp and mkdir.  That lets you specify the permissions as you create the targets.



Consider using a $DESTDIR prefix when specifying the targets.  This makes it easier for package builders (such as debhelper) to re-use your script.  They will need to omit the dependency checks, so make that separable if you can (or at least disable it when $DESTDIR is set).