#!/bin/bash #### make /ext directory ################ if [ ! -e /ext ]; then mkdir /ext cd /ext mkdir cmp exp env bin ini fi #### add zzz.sh to /etc/profile.d ################ cd /etc/profile.d if [ ! -e zzz.sh ]; then cat << EOF > zzz.sh if ! echo \$PATH | grep -q /ext/bin:; then PATH=/ext/bin:\$PATH fi for f in /ext/ini/*.sh; do . \$f done EOF fi