3 echo "$0 app dir - packs a musl dynamically linked app and all"
4 echo "library dependencies into a dir and creates a wrapper to run it"
9 if test -z "$dir" ; then
13 for lib
in `ldd "$app" |awk '/=>/ { print $3 }'` ; do
16 new_app
="$(basename "$app")"
17 cp "$app" "$dir"/"$new_app".app
18 cat << EOF > "$dir"/"$new_app"
20 export LD_LIBRARY_PATH=.
21 exec ./ld-musl-*.so.1 "$new_app".app "\$@"
23 chmod +x
"$dir"/"$new_app"