diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-07-04 23:54:53 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-07-04 23:54:53 +0000 |
commit | c752ea05bcaf4e229d536773a1e0df7494c96e86 (patch) | |
tree | 2189ca08bb829bc74d2f91b602507c6a230b5b69 | |
parent | 37caa41215e17fe7f7f955154641408926ae58b9 (diff) |
Switch to build user if run as root. Prompt output $ or # affects test.
-rw-r--r-- | regress/bin/ksh/edit/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/regress/bin/ksh/edit/Makefile b/regress/bin/ksh/edit/Makefile index 23fe460704c..3d823bef0c2 100644 --- a/regress/bin/ksh/edit/Makefile +++ b/regress/bin/ksh/edit/Makefile @@ -5,10 +5,13 @@ SRCS= edit.c CFLAGS+= -Wall LDADD+= -lutil +# Switch to build user if run as root. Prompt output $ or # affects test. +SU!!= if [ "$$USER" = root ]; then echo su build; else echo sh; fi + emacs: edit - @sh ${.CURDIR}/emacs.sh ${.CURDIR} + ${SU} ${.CURDIR}/emacs.sh ${.CURDIR} vi: edit - @sh ${.CURDIR}/vi.sh ${.CURDIR} + ${SU} ${.CURDIR}/vi.sh ${.CURDIR} .include <bsd.regress.mk> |