From d7a7a2e76a1a370be33fb6a0281d45d7b7791f66 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 25 Jan 2015 16:36:18 +0100 Subject: [PATCH] sys/profile: Reformat "for" loops (No functional changes) --- sys/profile | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/sys/profile b/sys/profile index 3af1ad9..a68b497 100644 --- a/sys/profile +++ b/sys/profile @@ -54,7 +54,13 @@ else fi # prepend optional directories to PATH ... unset path -for d in /Developer/usr/bin /usr/pkg/bin /usr/ucb /usr/lib/ccache /opt/*/bin; do +for d in \ + /Developer/usr/bin \ + /usr/pkg/bin \ + /usr/ucb \ + /usr/lib/ccache \ + /opt/*/bin +do if [ -d "$d" -o -h "$d" ]; then [ -e "$d/.not_in_path" ] || path="$path$d:" fi @@ -62,7 +68,10 @@ done [ -n "$path" ] && PATH="$path$PATH" unset path if [ "$LOGNAME" = "root" ]; then - for d in /usr/pkg/sbin /opt/*/sbin; do + for d in \ + /usr/pkg/sbin \ + /opt/*/sbin + do if [ -d "$d" -o -h "$d" ]; then [ -e "$d/.not_in_path" ] || path="$path$d:" fi @@ -71,7 +80,11 @@ if [ "$LOGNAME" = "root" ]; then unset path fi # append optional directories to PATH ... -for d in /usr/bin/X11 /usr/games /usr/share/php/bin; do +for d in \ + /usr/bin/X11 \ + /usr/games \ + /usr/share/php/bin +do if [ -d "$d" -o -h "$d" ]; then [ -e "$d/.not_in_path" ] || PATH="$PATH:$d" fi @@ -90,7 +103,12 @@ if [ ! "$(type -t manpath 2>/dev/null)" ]; then [ -z "$MANPATH" ] \ && MANPATH="/usr/local/share/man:/usr/share/man:/usr/man" path="" - for d in /usr/pkg/share/man /usr/pkg/man /opt/*/share/man /opt/*/man; do + for d in \ + /usr/pkg/share/man \ + /usr/pkg/man \ + /opt/*/share/man \ + /opt/*/man + do [ -d "$d" -o -h "$d" ] && path="$path$d:" done [ -n "$path" ] && MANPATH="$path$MANPATH" @@ -138,7 +156,10 @@ fi # read profile additions if [ -d /etc/profile.d -o -d /usr/local/etc/profile.d ]; then - for f in /etc/profile.d/* /usr/local/etc/profile.d/*; do + for f in \ + /etc/profile.d/* \ + /usr/local/etc/profile.d/* + do [ -r "$f" ] || continue case "$f" in *.csh) -- 2.39.2