Your script passes this type of files for decompilation? I just haven't figured out exactly how it looks for and defines files for decompilation.
Yeah... So, if you just pass a folder to unrpyc, then unrpyc will find all *.rpyc and *.rpymc recursively in that folder. And My bash script does this (these why, I think you said about I pass all files into single unrpyc).
You can see theres a dot, on this code:
"$python" "$unrpyc" "${opt[@]}" .
this is telling unrpyc to look on this current folder. the dot is an alias of current folder.
[[ $1 ]] && opt=("${opt[@]}" "$1")
Probably this line of code, but it's not very clear for me how it works.
On shell script, the code
$1
, is the first positional argument of a function or the main script it self if it invoked out of a function. (
$1
,
$2
,
$3
, until
$9
: positional arguments)
And specifically on Bash conditional
[[ ]]
checks, you can omit the "
if
" keyword and the
&&
will run the right hand code if the
[[ ]]
evaluates to
true
So, on my script, basically if we don't pass anything to that function then it just run "--init-offset" on unrpyc parameter (the
opt
variable), where I set it on
local opt=(--init-offset)
.
And on "Menu" option number 9 (try harder), I pass the "--try-hard" argument, so it will add it to the
opt
variable. That is all.