You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
PR #688 and issue #682 split a shell script into 3 elements which are variable, command and branch. We also need to consider loop in the shell script, here is an example.
Consider 3 types of loop in a shell scipt: for, while, until. They are all ended with keyword done.
To Do
Add keywords for loop.
Parse loop: Extract variable and command in a loop. Also we need to skip keyword break.
This commit enables parse_shell_loop_and_branch() to extract
statements for a loop, and use clean_command() to clean tab
and line indentations.
Modificate the statement dictionary, change the dict for command:
{'content':..., 'command':...} to {'conmmand':...}.
Since we will do parse_command() in the futher part of finding the
installed software, we will only record the concatenated command
string here.
Works towards tern-tools#682 and tern-tools#706.
Signed-off-by: WangJL <hazard15020@gmail.com>
Pipe symbol '|' should not be seperated.
Command 'export' can be treated as variable assignment.
Works towards tern-tools#682 and tern-tools#706.
Signed-off-by: WangJL <hazard15020@gmail.com>
Description
PR #688 and issue #682 split a shell script into 3 elements which are
variable
,command
andbranch
. We also need to considerloop
in the shell script, here is an example.Consider 3 types of loop in a shell scipt: for, while, until. They are all ended with keyword
done
.To Do
loop
.loop
: Extractvariable
andcommand
in aloop
. Also we need to skip keywordbreak
.Background
Supplement to issue #682
Super Issues
#521
The text was updated successfully, but these errors were encountered: