diff options
Diffstat (limited to 'Argcfile.sh')
| -rw-r--r-- | Argcfile.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index 104e609..952921b 100644 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -457,7 +457,12 @@ install() { _die "error: your aichat version don't support function calling" fi if [[ ! -e "$functions_dir" ]]; then - ln -s "$(pwd)" "$functions_dir" + if _is_win; then + current_dir="$(cygpath -w "$(pwd)")" + cmd <<< "mklink /D \"${functions_dir%/}\" \"${current_dir%/}\"" > /dev/null + else + ln -s "$(pwd)" "$functions_dir" + fi echo "$functions_dir symlinked" else echo "$functions_dir already exists" @@ -598,5 +603,7 @@ _die() { exit 1 } +if _is_win; then set -o igncr; fi + # See more details at https://github.com/sigoden/argc eval "$(argc --argc-eval "$0" "$@")" |
