#!/bin/bash echo "$0: This never worked, despite the patches applying cleanly" 1>&2 exit 1 set -eu set -o pipefail preflight_good=True case "$(whoami)" in root) ;; *) echo "$0: Please run me as root" 1>&2 preflight_good=False ;; esac if ! [ -d /usr/share/cinnamon ] then echo "$0: /usr/share/cinnamon does not exist. I do not know what to do." 1>&2 preflight_good=False fi case "$preflight_good" in True) ;; False) echo "$0: One or more items in preflight check failed" 1>&2 exit 1 ;; *) echo "$0: internal error: \$preflight_good is not True or False" 1>&2 exit 1 ;; esac prior_dir=$(set -eu; pwd) cd /usr/share/cinnamon patch -p0 < "$prior_dir"/patches