aboutsummaryrefslogtreecommitdiffstats
path: root/Argcfile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Argcfile.sh')
-rw-r--r--Argcfile.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/Argcfile.sh b/Argcfile.sh
index 5b102fe..f1496ed 100644
--- a/Argcfile.sh
+++ b/Argcfile.sh
@@ -178,9 +178,17 @@ install() {
# @cmd Show versions of required tools for bug reports.
version() {
+ uname -a
argc --argc-version
jq --version
- curl --version | head -n 1
+ for item in "${LANG_CMDS[@]}"; do
+ cmd="${item#*:}"
+ if [[ "$cmd" == "bash" ]]; then
+ echo "$(argc --argc-shell-path) $("$(argc --argc-shell-path)" --version | head -n 1)"
+ elif command -v "$cmd" &> /dev/null; then
+ echo "$(_normalize_path "$(which $cmd)") $($cmd --version)"
+ fi
+ done
}
_lang_to_cmd() {
@@ -213,6 +221,14 @@ $run "%script_dir%cmd\cmd.$lang" "%script_name%.$lang" %*
EOF
}
+_normalize_path() {
+ if _is_win; then
+ cygpath -w "$1"
+ else
+ echo "$1"
+ fi
+}
+
_is_win() {
if [[ "$OS" == "Windows_NT" ]]; then
return 0