1 parent a3771e5 commit aae4a99Copy full SHA for aae4a99
1 file changed
star_2_0_0.bash
@@ -5,6 +5,21 @@
5
export _STAR_HOME="${_STAR_HOME:-$HOME/.star}"
6
export _STAR_STARS_DIR="stars"
7
8
+if [ -n "${BASH_SOURCE:-}" ]; then
9
+ script_path="${BASH_SOURCE[0]}"
10
+elif [ -n "${ZSH_VERSION:-}" ]; then
11
+ script_path="${(%):-%N}"
12
+fi
13
+
14
+script_dir="$( cd -- "$( dirname -- "$script_path" )" && pwd )"
15
16
+if [[ $PATH != *$script_dir* ]]; then
17
+ PATH="$script_dir/bin:$PATH"
18
+ export PATH
19
20
+unset script_path
21
+unset script_dir
22
23
if [[ ! -d "$_STAR_HOME" ]]; then
24
mkdir -p "$_STAR_HOME"
25
fi
0 commit comments