#!/bin/sh # $1 - file to patch [ ! -f "$1" ] && exit echo patch: $1 B="oscam/bin/oscam" cp "$1" "$B" chmod +x "$B" D=/lib I=libc.so #patchelf --set-rpath "$D" "$B" patchelf --set-interpreter "${D}/${I}" "$B" chrpath -l "$B" file "$B" rm -f oscam.tar tar cf oscam.tar oscam