Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openwrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Freifunk Luebeck
openwrt
Commits
509f39a1
Commit
509f39a1
authored
12 years ago
by
Jo-Philipp Wich
Browse files
Options
Downloads
Patches
Plain Diff
scripts: bundle-libraries.sh: support mixing 32bit and 64bit binaries
SVN-Revision: 35349
parent
839f3ab0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/bundle-libraries.sh
+7
-6
7 additions, 6 deletions
scripts/bundle-libraries.sh
with
7 additions
and
6 deletions
scripts/bundle-libraries.sh
+
7
−
6
View file @
509f39a1
#!/usr/bin/env bash
#!/usr/bin/env bash
#
#
# Script to install host system binaries along with required libraries.
# Script to install host system binaries along with required libraries.
# Refer to the --help output for more information.
#
#
# Copyright (C) 2012 Jo-Philipp Wich <jow@openwrt.org>
# Copyright (C) 2012
-2013
Jo-Philipp Wich <jow@openwrt.org>
#
#
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
...
@@ -90,17 +89,19 @@ for BIN in "$@"; do
...
@@ -90,17 +89,19 @@ for BIN in "$@"; do
if
[
-n
"
$LDSO
"
]
;
then
if
[
-n
"
$LDSO
"
]
;
then
_cp
"
$BIN
"
"
$DIR
/bundled/
${
BIN
##*/
}
"
_cp
"
$BIN
"
"
$DIR
/bundled/
${
BIN
##*/
}
"
[
-x
"
$DIR
/bundled/run.sh"
]
||
{
RUN
=
"
${
LDSO
#ld-
}
"
;
RUN
=
"run-
${
RUN
%%.so*
}
.sh"
cat
<<-
EOF
> "
$DIR
/bundled/run.sh"
[
-x
"
$DIR
/bundled/
$RUN
"
]
||
{
cat
<<-
EOF
> "
$DIR
/bundled/
$RUN
"
#!/usr/bin/env bash
#!/usr/bin/env bash
dir="
\$
(dirname "
\$
0")"
dir="
\$
(dirname "
\$
0")"
bin="
\$
(basename "
\$
0")"
bin="
\$
(basename "
\$
0")"
exec -a "
\$
0" "
\$
dir/bundled/lib/
$LDSO
" --library-path "
\$
dir/bundled/lib" "
\$
dir/bundled/
\$
bin" "
\$
@"
exec -a "
\$
0" "
\$
dir/bundled/lib/
$LDSO
" --library-path "
\$
dir/bundled/lib" "
\$
dir/bundled/
\$
bin" "
\$
@"
EOF
EOF
chmod
${
VERBOSE
:+-v
}
0755
"
$DIR
/bundled/
run.sh
"
chmod
${
VERBOSE
:+-v
}
0755
"
$DIR
/bundled/
$RUN
"
}
}
_ln
"./bundled/
run.sh
"
"
$DIR
/
${
BIN
##*/
}
"
_ln
"./bundled/
$RUN
"
"
$DIR
/
${
BIN
##*/
}
"
# is a static executable or non-elf binary
# is a static executable or non-elf binary
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment