Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix NOSCRIPTSTUB #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -647,14 +647,14 @@ make_isaexec_stub_arch() {
for file in $1/*; do
[[ -f $file ]] || continue # Deals with empty dirs & non-files
# Check to make sure we don't have a script
read -n 5 < $file
read -n 4 REPLY < $file
file=`echo $file | sed -e "s/$1\///;"`
# Skip if we already made a stub for this file
[[ -f $file ]] && continue
# Only copy non-binaries if we set NOSCRIPTSTUB
if [[ $REPLY != $'\177'ELF && -n "$NOSCRIPTSTUB" ]]; then
logmsg "------ Non-binary file: $file - copying instead"
cp $1/$file .
logmsg "------ Non-binary file: $file - moving instead"
mv $1/$file .
chmod +x $file
continue
fi
Expand Down