X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=rc%2Fset_path;h=c3f958090a577c928a35ac2631e8fd147f99e1e2;hb=c7fc0ce408c29c87654ece243684c215a56a4d0d;hp=cccac0d39498225c427c98d47e180d1f28c43f22;hpb=56ed74d620f8fbba5430642cf4ddbcb8b818b9a3;p=clearscm.git diff --git a/rc/set_path b/rc/set_path index cccac0d..c3f9580 100644 --- a/rc/set_path +++ b/rc/set_path @@ -14,7 +14,7 @@ ################################################################################ function append_to_path { component="$1" - + if [ -d "$component" ]; then if [ -z "$PATH" ]; then PATH="$component" @@ -24,6 +24,14 @@ function append_to_path { fi } # append_to_path +function prepend_to_path { + component="$1" + + if [ -d "$component" ]; then + PATH="$component:$PATH" + fi +} # prepend_to_path + function append_to_manpath { component="$1" @@ -135,4 +143,3 @@ if [ "hp-ux" = "10" ]; then export SHLIB_PATH=$SHLIB_PATH:$M_LROOT/bin export LD_LIBRARY_PATH=$SHLIB_PATH:$M_LROOT/bin fi -