mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-15 01:40:22 +08:00
added profile.d stuff
This commit is contained in:
parent
4245608e6d
commit
79f8560a24
31
vendor/cmder_exinit
vendored
31
vendor/cmder_exinit
vendored
@ -1,7 +1,8 @@
|
|||||||
# Copy this file to your externally installed meaning not in the cmder/vendor
|
# Copy this file to your non integrated *nix-like environment,
|
||||||
# folder Cygwin/Msys2/Msys installs '/etc/profile.d/' folder to integrate
|
# Cygwin/MinGW/MSys2/Git for Windows SDK, installs '/etc/profile.d/'
|
||||||
# the externally installed Unix like environment into Cmder so it has
|
# folder to integrate the externally installed Unix like environment
|
||||||
# access to settings stored in Cmder/config folder when launched.
|
# into Cmder so it has access to settings stored in Cmder/config
|
||||||
|
# folder when launched.
|
||||||
#
|
#
|
||||||
# The destination file extension depends on the shell you use. For example:
|
# The destination file extension depends on the shell you use. For example:
|
||||||
#
|
#
|
||||||
@ -12,8 +13,11 @@
|
|||||||
# # from outside Cmder.
|
# # from outside Cmder.
|
||||||
# CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder.
|
# CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder.
|
||||||
|
|
||||||
# Add portable user customizations ${CMDER_ROOT}/config/user-profile.sh,
|
# Add portable user customizations ${CMDER_ROOT}/config/user-profile.sh or
|
||||||
# these customizations will follow Cmder if $CMDER_ROOT is copied
|
# add whole config scripts to ${CMDER_ROOT}/config/profile.d both will be sourced
|
||||||
|
# from mthis file and be appied to the environment at startup.
|
||||||
|
#
|
||||||
|
# These customizations will follow Cmder if $CMDER_ROOT is copied
|
||||||
# to another machine.
|
# to another machine.
|
||||||
#
|
#
|
||||||
# Add system specific users customizations to $HOME/.bashrc, these
|
# Add system specific users customizations to $HOME/.bashrc, these
|
||||||
@ -46,6 +50,21 @@ PATH=${CMDER_ROOT}/bin:$PATH:${CMDER_ROOT}
|
|||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
if [ ! -d ${CMDER_ROOT}/config/profile.d ; then
|
||||||
|
mkdir -p ${CMDER_ROOT}/config/profile.d
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Drop *.sh files into "${CMDER_ROOT}\config\profile.d"
|
||||||
|
# to source them at startup.
|
||||||
|
if [ -d ${CMDER_ROOT}/config/profile.d ] ; then
|
||||||
|
pushd ${CMDER_ROOT}/config/profile.d >/dev/null
|
||||||
|
for x in $(ls ${CMDER_ROOT}/config/profile.d/*.sh) ; do
|
||||||
|
# echo ${x}
|
||||||
|
. $x
|
||||||
|
done
|
||||||
|
popd >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
|
if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
|
||||||
. ${CMDER_ROOT}/config/user-profile.sh
|
. ${CMDER_ROOT}/config/user-profile.sh
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user