|
124 | 124 | $M_SCRIPT_DIR/../post.sh || { print_err "Failed to move to install dir"; false ; }
|
125 | 125 | test -f "$_usr_yaml" && rm "$_usr_yaml"
|
126 | 126 | end=`date +%s`
|
127 |
| -_env_root=$(realpath $(dirname $_inst_path)) |
128 |
| -_env_name=$CW_INSTALLATION_PREFIX |
129 |
| -IFS=':' read -r -a _paths <<< "${TYKKY_PATH:-$HOME/.tykky}" |
130 |
| -for _path in "${_paths[@]}"; do |
131 |
| - if [ "$_env_root" = "$(realpath $_path)" ]; then |
132 |
| - _env_name=$(basename $CW_INSTALLATION_PREFIX) |
133 |
| - break |
134 |
| - fi |
135 |
| -done |
136 |
| -print_info "Done, duration: $((end-start))s" 1 |
137 |
| -print_info "Environment has been installed to $CW_INSTALLATION_PREFIX |
| 127 | + |
| 128 | + |
| 129 | +if command -v tykky &>/dev/null ; then |
| 130 | + _env_root=$(realpath $(dirname $_inst_path)) |
| 131 | + _env_name=$CW_INSTALLATION_PREFIX |
| 132 | + IFS=':' read -r -a _paths <<< "${TYKKY_PATH:-$HOME/.tykky}" |
| 133 | + for _path in "${_paths[@]}"; do |
| 134 | + if [ "$_env_root" = "$(realpath $_path)" ]; then |
| 135 | + _env_name=$(basename $CW_INSTALLATION_PREFIX) |
| 136 | + break |
| 137 | + fi |
| 138 | + done |
| 139 | + info_msg="Environment has been installed to $CW_INSTALLATION_PREFIX |
138 | 140 | \tTo use, activate with:
|
139 | 141 | \ttykky activate $_env_name
|
140 | 142 | \tAlternatively, add the bin folder to your path e.g:
|
141 |
| -\texport PATH=\"$_inst_path/bin:\$PATH\"" 1 |
142 |
| - |
| 143 | +\texport PATH=\"$_inst_path/bin:\$PATH\"" |
| 144 | +else |
| 145 | + info_msg="Program has been installed to $CW_INSTALLATION_PREFIX |
| 146 | +\tTo use add the bin folder to your path e.g: |
| 147 | +\texport PATH=\"$_inst_path/bin:\$PATH\"" |
| 148 | +fi |
| 149 | +print_info "Done, duration: $((end-start))s" 1 |
| 150 | +print_info "$info_msg" 1 |
0 commit comments