File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ ../libexec/rbenv-init-project
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+
4
+ RBENV_INIT_PROJECT_VERSION=' 0.0.1'
5
+
6
+ [ -n " $RBENV_DEBUG " ] && set -x
7
+
8
+ # Provide rbenv completions
9
+ if [ " $1 " = " --complete" ]; then
10
+ echo " current"
11
+ echo " version"
12
+ exit
13
+ fi
14
+
15
+ if [ " $1 " = " version" ] || [ " $1 " = " --version" ]; then
16
+ echo " rbenv-init-project ${RBENV_INIT_PROJECT_VERSION} "
17
+ echo " by @benjaminws"
18
+ echo " http://github.com/benjaminws/rbenv-init-project"
19
+ exit
20
+ fi
21
+
22
+ resolve_link () {
23
+ $( type -p greadlink readlink | head -1) $1
24
+ }
25
+
26
+ abs_dirname () {
27
+ local cwd=" $( pwd) "
28
+ local path=" $1 "
29
+
30
+ while [ -n " $path " ]; do
31
+ cd " ${path%/* } "
32
+ local name=" ${path##*/ } "
33
+ path=" $( resolve_link " $name " || true) "
34
+ done
35
+
36
+ pwd
37
+ cd " $cwd "
38
+ }
39
+
40
+ bin_path=" $( abs_dirname " $0 " ) "
41
+ export PATH=" ${bin_path} :$PATH "
42
+
43
+ command=" $1 "
44
+ command_path=" $( command -v " rbenv-init-project-$command " || true) "
45
+
46
+ echo $command_path
47
+ if [ -z " $command_path " ]; then
48
+ command_path=" $( command -v " rbenv-init-project-current" ) "
49
+ fi
50
+
51
+ echo $command_path
52
+
53
+ shift
54
+ exec " $command_path " " $@ "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+
4
+ echo " hi"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -e
3
+
4
+ { echo " version ${RBENV_INIT_PROJECT_VERSION} "
5
+ echo " ${0##*/ } [command] [options]"
6
+ echo
7
+ echo " possible commands are:"
8
+ echo " current (use cwd for gemset name, active version of ruby) *default"
9
+ echo " help (this)"
10
+ echo " version"
11
+ } >&2
12
+ exit 1
13
+
You can’t perform that action at this time.
0 commit comments