Skip to content

Commit

Permalink
Fix awk positional specifiers. Close #2
Browse files Browse the repository at this point in the history
Fixes an error while compiling in Ubuntu 18.04/19.10:

    awk: run time error: improper conversion(number 1) in printf("%1$s/%2$s.apk
    %1$s/%2$s/%2$s.apk
    ")

I'm not sure about the solution. I can't find any documentation with this syntax, or why it changed, so it can probably break at some point. But it works on Debian 10 right now, so it seems to be backward compatible.
  • Loading branch information
Roboe committed Dec 23, 2019
1 parent 6d5e1e5 commit 2405d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ apps_config | xargs -l bash -c 'download_app $@' -

echo "~~~ Making OTA survival script"
cat templates/addond-head > $ADDOND_FILE
apps_config | awk '{sub("/system/", "", $4); printf "%1$s/%2$s.apk\n%1$s/%2$s/%2$s.apk\n", $4, $3}' >> $ADDOND_FILE
apps_config | awk '{sub("/system/", "", $4); printf "$1/$2.apk\n$1/$2/$2.apk\n", $4, $3}' >> $ADDOND_FILE
cat templates/addond-tail >> $ADDOND_FILE

echo "~~~ Packing up"
Expand Down

0 comments on commit 2405d5c

Please sign in to comment.