Fix sourced usage

This commit is contained in:
Akash Manohar J 2015-05-14 12:21:01 +05:30
parent 7f14e06fd7
commit e80ec0cfbf

View File

@ -1,4 +1,7 @@
#/usr/bin/env sh
#!/usr/bin/env sh
asdf_dir=$(cd $(dirname $0); echo $(pwd))
export PATH="$(asdf_dir)/bin:$(asdf_dir)/shims:$PATH"
#TODO check for ${BASH_SOURCE[0]} or use $0
current_script_path=${BASH_SOURCE[0]}
asdf_dir=$(cd $(dirname $current_script_path); echo $(pwd))
export PATH="${asdf_dir}/bin:${asdf_dir}/shims:$PATH"