void-packages/srcpkgs/cdm/patches/fix-bashisms.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

18 lines
631 B
Diff

Source: maxice8
Upstream: to be upstreamed
Reason: fixes running it with POSIX shells
--- a/src/profile.sh
+++ b/src/profile.sh
@@ -1,8 +1,8 @@
# To avoid potential situation where cdm(1) crashes on every TTY, here we
# default to execute cdm(1) on tty1 only, and leave other TTYs untouched.
-if [[ "$(tty)" == '/dev/tty1' ]]; then
- [[ -n "$CDM_SPAWN" ]] && return
+if [ "$(tty)" = '/dev/tty1' ]; then
+ [ -n "$CDM_SPAWN" ] && return
# Avoid executing cdm(1) when X11 has already been started.
- [[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm
+ [ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ] && exec cdm
fi