TickTick
TickTick copied to clipboard
Busyboxy / ash support
Hi there,
I am very interested in using ticktick.sh. However, I am having a problem when running it on OpenWRT --> a distro that uses Busybox / ash (not bash).
I replaced the first line:
!/usr/bin/env bash
to be:
!/bin/sh
But when I try to run it, I get this:
./ticktick.sh
./ticktick.sh: line 332: syntax error: bad substitution
That is referring to this:
__tick_runtime_length() { echo $#; } __tick_runtime_first() { echo ${!1}; } __tick_runtime_last() { eval 'echo $'${!#}; } __tick_runtime_pop() { eval unset ${!#}; }
Any ideas? Thanks!
They are different languages. I know they look the same and they are in the same family of bourne-derived shells, they are actually different though. Different globals, different settings available, different debugging hooks, different calling procedures ... all over the place.
I know bourne, tcsh, bash, and zsh probably better than most, and I know of ash, and have used busybox before. Enough to realize that this probably isn't a simple swap. Although it might be.
What's your use case?
From: slthomason [email protected] To: Chris McKenzie [email protected] Sent: Friday, June 29, 2012 3:03 AM Subject: [TickTick] Busyboxy / ash support (#22)
Hi there,
I am very interested in using ticktick.sh. However, I am having a problem when running it on OpenWRT --> a distro that uses Busybox / ash (not bash).
I replaced the first line:
#!/usr/bin/env bash
to be:
#!/bin/sh
But when I try to run it, I get this:
./ticktick.sh
./ticktick.sh: line 332: syntax error: bad substitution
That is referring to this:
__tick_runtime_length() { echo $#; } __tick_runtime_first() { echo ${!1}; } __tick_runtime_last() { eval 'echo $'${!#}; } __tick_runtime_pop() { eval unset ${!#}; }
Any ideas? Thanks!
Reply to this email directly or view it on GitHub: https://github.com/kristopolous/TickTick/issues/22
I've poured over busybox a few nights off and on now. Although I've got some leads on how to do equivalent functionality to TickTick, I can't really pull it off without maintaining a separate code-base, I'd like to close this and take no action. If I don't hear anything on it by say, November 1st (that's 5 weeks from now), I'll do so; that is unless I have multiple epiphanies and can figure out how to do this without incurring substantial risk (unlikely).
I have moved on to another project - but if this were to become possible, I would always be interested. But no rush. But I know the embedded world would be grafeful if you were able to figure it out.
Spencer
On Sat, Sep 29, 2012 at 6:06 PM, Chris McKenzie [email protected]:
I've poured over busybox a few nights off and on now. Although I've got some leads on how to do equivalent functionality to TickTick, I can't really pull it off without maintaining a separate code-base, I'd like to close this and take no action. If I don't hear anything on it by say, November 1st (that's 5 weeks from now), I'll do so; that is unless I have multiple epiphanies and can figure out how to do this without incurring substantial risk (unlikely).
— Reply to this email directly or view it on GitHubhttps://github.com/kristopolous/TickTick/issues/22#issuecomment-9009799.
digging up an old issue I would love this so I could parse ulogd2 json output and display it inside an html table to show in LUCI
@CanadianJeff If you want a serious JSON parser, see jq
. If you want a serious JSON parser but want it to run with busybox ash, go for JSON.sh
. You don't use a big magical transpiler in production.
OpenWrt has https://openwrt.org/docs/guide-developer/jshn but for BusyBox only systems we still need something instead