diff --git a/README b/README index 8d5ba67..ce81039 100755 --- a/README +++ b/README @@ -6,8 +6,11 @@ cd $( dirname $0 )/bin -( +( +echo Add the tools to PATH by sourcing the "rc" in this folder + for e in *; do + test -x $e || continue echo -e "\n===== $e =====\n" ./$e -h done diff --git a/rc b/rc new file mode 100644 index 0000000..a4d0cf9 --- /dev/null +++ b/rc @@ -0,0 +1,12 @@ +# source me to enable tools + +TOOLSPATH=$( readlink -f $( dirname "$BASH_SOURCE" ) ) + +PATH=$PATH:"$TOOLSPATH"/bin + +# remove duplicate path +PATH=$( echo $PATH | awk -F: '{for (i=1;i<=NF;i++) { if ( !x[$i]++ ) printf("%s:",$i); }}' | sed 's,:\+$,,g' ) +export PATH + +. "$TOOLSPATH"/qcd_function +