Ethan Yonker | 9ee045a | 2016-01-29 16:37:37 -0600 | [diff] [blame^] | 1 | #!/bin/bash |
2 | |||||
3 | process_file() | ||||
4 | { | ||||
5 | src=$1 | ||||
6 | dst=$1-1 #/$(basename $2) | ||||
7 | cp -f -p $src $dst | ||||
8 | |||||
9 | sed "s|/system/bin/linker64\x0|/sbin/linker64\x0\x0\x0\x0\x0\x0\x0|g" $dst | sed "s|/system/bin/linker\x0|/sbin/linker\x0\x0\x0\x0\x0\x0\x0|g" | sed "s|/system/bin/sh\x0|/sbin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst-mod | ||||
10 | #sed "s|/sbin/linker\x0|/system/bin/linker\x0\x0\x0\x0\x0\x0\x0|g" $dst | sed "s|/sbin/sh\x0|/system/bin/sh\x0\x0\x0\x0\x0\x0\x0|g" > $dst-mod | ||||
11 | rm $dst | ||||
12 | } | ||||
13 | |||||
14 | |||||
15 | dest=$1 | ||||
16 | for ARG in $* | ||||
17 | do | ||||
18 | process_file $dest $ARG | ||||
19 | done |