Merge pull request #625 from orbea/retrolink

retrolink.sh: Silent shellcheck warnings.
This commit is contained in:
Twinaphex 2017-12-02 07:51:11 +01:00 committed by GitHub
commit 12d2e247fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,8 +3,8 @@
#Usage: ./retrolink foobar_libretro.so
#http://www.lightofdawn.org/wiki/wiki.cgi/NewAppsOnOldGlibc
start=$(readelf -V $1 | grep -A1 .gnu.version_r | tail -n1 | cut -d' ' -f6)
pos=$(readelf -V $1 | grep 'Flags: none' | cut -d' ' -f3 | sed 's/://')
start=$(readelf -V "$1" | grep -A1 .gnu.version_r | tail -n1 | cut -d' ' -f6)
pos=$(readelf -V "$1" | grep 'Flags: none' | cut -d' ' -f3 | sed 's/://')
for pos in $pos; do
printf '\x02' | dd if=/dev/stdin of=$1 seek=$(($start+$pos+4)) count=1 bs=1 conv=notrunc 2> /dev/null
printf '\x02' | dd if=/dev/stdin of="$1" seek=$((start+pos+4)) count=1 bs=1 conv=notrunc 2> /dev/null
done