metacall / install

Cross-platform set of script to install MetaCall infrastructure.
https://metacall.io
Apache License 2.0
12 stars 12 forks source link

Fix zsh detection of curl/shells/shebangs #8

Closed AkechiShiro closed 2 years ago

AkechiShiro commented 2 years ago

+binary_install:5> dependencies +main:41> wait 1665 +dependencies:1> print 'Checking system dependencies.' +print:1> printf '%b\n' $'\C-[(B\C-[[m\M-^V Checking system dependencies.' ▷ Checking system dependencies. +dependencies:4> [ 0 -eq 0 ']' +dependencies:5> programs_required tar grep tail awk rev cut uname echo printf rm id head chmod chown ln +programs_required:1> prog=tar +programs_required:2> program tar +program:1> command -v tar +programs_required:1> prog=grep +programs_required:2> program grep +program:1> command -v grep +programs_required:1> prog=tail +programs_required:2> program tail +program:1> command -v tail +programs_required:1> prog=awk +programs_required:2> program awk +program:1> command -v awk +programs_required:1> prog=rev +programs_required:2> program rev +program:1> command -v rev +programs_required:1> prog=cut +programs_required:2> program cut +program:1> command -v cut +programs_required:1> prog=uname +programs_required:2> program uname +program:1> command -v uname +programs_required:1> prog=echo +programs_required:2> program echo +program:1> command -v echo +programs_required:1> prog=printf +programs_required:2> program printf +program:1> command -v printf +programs_required:1> prog=rm +programs_required:2> program rm +program:1> command -v rm +programs_required:1> prog=id +programs_required:2> program id +program:1> command -v id +programs_required:1> prog=head +programs_required:2> program head +program:1> command -v head +programs_required:1> prog=chmod +programs_required:2> program chmod +program:1> command -v chmod +programs_required:1> prog=chown +programs_required:2> program chown +program:1> command -v chown +programs_required:1> prog=ln +programs_required:2> program ln +program:1> command -v ln +dependencies:10> id -u +dependencies:10> [ 501 -ne 0 ']' +dependencies:11> programs_required tee +programs_required:1> prog=tee +programs_required:2> program tee +program:1> command -v tee +dependencies:15> [ 0 -eq 0 ']' +dependencies:16> local download_dependencies=( curl wget ) +dependencies:17> programs_required_one curl wget +programs_required_one:1> prog=curl +programs_required_one:2> program curl +program:1> command -v curl +programs_required_one:3> echo curl +programs_required_one:4> return +dependencies:17> local download_program=curl +dependencies:19> [ -z curl ']' +dependencies:25> CMD_DOWNLOAD=curl +dependencies:29> find_shebang +find_shebang:2> local shebang_dependencies=( '/usr/bin/env /bin/env' ) +find_shebang:3> programs_required_one '/usr/bin/env /bin/env' +programs_required_one:1> prog=/usr/bin/env /bin/env +programs_required_one:2> program '/usr/bin/env /bin/env' +program:1> command -v '/usr/bin/env /bin/env' +find_shebang:3> local shebang_program='' +find_shebang:5> [ -z '' ']' +find_shebang:6> warning 'None of the following programs are installed: /usr/bin/env /bin/env. Trying to detect common shells...' +warning:1> printf '%b\n' $'\C-[[33m\M-^@\C-[(B\C-[[m None of the following programs are installed: /usr/bin/env /bin/env. Trying to detect common shells...' ‼ None of the following programs are installed: /usr/bin/env /bin/env. Trying to detect common shells... +find_shebang:9> local shebang_dependencies=( '/bin/sh /bin/bash /bin/dash' ) +find_shebang:10> programs_required_one '/bin/sh /bin/bash /bin/dash' +programs_required_one:1> prog=/bin/sh /bin/bash /bin/dash +programs_required_one:2> program '/bin/sh /bin/bash /bin/dash' +program:1> command -v '/bin/sh /bin/bash /bin/dash' +find_shebang:10> local shebang_program='' +find_shebang:12> [ -z '' ']' +find_shebang:13> err 'None of the following programs are installed: /bin/sh /bin/bash /bin/dash. One of them is required at least to find the shell. Aborting installation.' +err:1> printf '%b\n' $'\C-[[31m\M-^\M-^X\C-[(B\C-[[m None of the following programs are installed: /bin/sh /bin/bash /bin/dash. One of them is required at least to find the shell. Aborting installation.' ✘ None of the following programs are installed: /bin/sh /bin/bash /bin/dash. One of them is required at least to find the shell. Aborting installation. +find_shebang:14> exit 1 +main:42> result=1 +main:44> [ 1 -ne 0 ']' +main:46> [ 0 -eq 1 ']' +main:51> programs_required read +programs_required:1> prog=read +programs_required:2> program read +program:1> command -v read +main:54> case 569Xx (i) +main:54> case 569Xx (*) +main:56> local interactive=0 +main:59> [ 0 -ne 0 ']' +main:64> warning 'Binary installation has failed, fallback to Docker installation.' +warning:1> printf '%b\n' $'\C-[[33m\M-^@\C-[(B\C-[[m Binary installation has failed, fallback to Docker installation.' ‼ Binary installation has failed, fallback to Docker installation. +main:69> proc=1670 +main:70> wait 1670 +main:68> docker_install +docker_install:2> title 'MetaCall Docker Installer' +title:1> printf '%b\n\n' $'\C-[(B\C-[[m\C-[[1mMetaCall Docker Installer\C-[(B\C-[[m' MetaCall Docker Installer

+docker_install:5> print 'Checking Docker Dependency.' +print:1> printf '%b\n' $'\C-[(B\C-[[m\M-^V Checking Docker Dependency.' ▷ Checking Docker Dependency. +docker_install:7> programs_required docker echo chmod +programs_required:1> prog=docker +programs_required:2> program docker +program:1> command -v docker +programs_required:3> err 'The program '\''docker'\'' is not found, it is required to run the installer. Aborting installation.' +err:1> printf '%b\n' $'\C-[[31m\M-^\M-^X\C-[(B\C-[[m The program \'docker\' is not found, it is required to run the installer. Aborting installation.' ✘ The program 'docker' is not found, it is required to run the installer. Aborting installation. +programs_required:4> exit 1 +main:71> result=1 +main:73> [ 1 -ne 0 ']' +main:74> exit 1