zodiac
zodiac copied to clipboard
illegal reference to array ignore
After installing Zodiac, I try to make the example site. Unfortunately, I got this error :
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 10: illegal reference to array ignore
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 16: illegal reference to array exts
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 21: illegal reference to array exts
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 26: illegal reference to array opts
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 10: illegal reference to array ignore
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 16: illegal reference to array exts
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 21: illegal reference to array exts
awk: Apps/zodiac/lib/zodiac/find_cmd.awk: line 26: illegal reference to array opts
I use Dash 0.5.7 and mawk 1.3.3.
zodiac currently only supports POSIX sh and awk. do you have a docker image with dash and mawk that you can share that I can test against? I can try getting it to work with those commands as well.
I do not use Docker. Dash and mawk intend to be both POSIX compliant according to man pages. Can you detail me how zod is supposed to work (piping config to awk, piping to shell). I may investigate what the issue is.
2015-06-05 2:34 GMT+02:00 Chase James [email protected]:
zodiac currently only supports POSIX sh and awk. do you have a docker image with dash and mawk that you can share that I can test against? I can try getting it to work with those commands as well.
— Reply to this email directly or view it on GitHub https://github.com/nuex/zodiac/issues/5#issuecomment-109104224.
This looks related: http://www.unix.com/shell-programming-and-scripting/142154-mawk-does-not-support-length-array.html.
Looks like it might work if we count the elements in the arrays manually or by using split without using length()
.
find_cmd.awk dynamically builds the find command to copy or render files based on the available filters and the file extensions they convert.
The usage of length()
may be the only culprit, but I'll need to test it on a vm/system with dash and mawk to make sure its compatible.
@Ninfomane I know this is ancient. Sorry :(. But could you tell me what OS you were using? I want to try to duplicate this.
Hello, I managed to reproduce this on Debian 8 with default dash and mawk:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.7 (jessie)
Release: 8.7
Codename: jessie
$ apt-cache policy dash
dash:
Installed: 0.5.7-4+b1
$ mawk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
compiled limits:
max NF 32767
sprintf buffer 2040
Edit: I just checked and it works fine with gawk.