Skip to content

Commit

Permalink
Change shebang to /usr/bin/env $PYTHONVERSION in /usr/bin/bottles*
Browse files Browse the repository at this point in the history
Fix #10
  • Loading branch information
ivan-hc authored Jun 30, 2024
1 parent b890b74 commit 0d435aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bottles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ rsync -av ./archlinux-junest/.junest/usr/share/glib-2.0/* ./$APP/$APP.AppDir/usr
rsync -av ./archlinux-junest/.junest/usr/lib/$PYTHONVERSION/site-packages/setuptools ./$APP/$APP.AppDir/usr/lib/$PYTHONVERSION/site-packages/
rsync -av ./archlinux-junest/.junest/usr/lib/$PYTHONVERSION/lib-dynload/_socket* ./$APP/$APP.AppDir/usr/lib/$PYTHONVERSION/lib-dynload/

# PATCH SHEBANG IN BOTTLES AND BOTTLES-CLI
sed -i "s#\!\/usr\/bin\/python3#\!\/usr\/bin\/env $PYTHONVERSION#g" ./$APP/$APP.AppDir/usr/bin/bottles*

# SYMLINK LIBCURL
cd ./$APP/$APP.AppDir/usr/lib/x86_64-linux-gnu
LIBCURL=$(ls . | sort | grep "libcurl.so" | head -1)
Expand Down Expand Up @@ -146,7 +149,8 @@ cat >> ./$APP/$APP.AppDir/AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export UNION_PRELOAD="${HERE}"
export LD_PRELOAD="${HERE}"/libunionpreload.so
export LD_PRELOAD="${HERE}"/libunionpreload.so:"${HERE}"/usr/lib/x86_64-linux-gnu/libcurl.so
export LD_LIBRARY_PATH=/lib/:/lib64/:/lib/x86_64-linux-gnu/:/usr/lib/:"${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${LD_LIBRARY_PATH}"
export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
export PYTHONPATH="${HERE}"/usr/lib/PYTHONVERSION/site-packages/:"${HERE}"/usr/lib/PYTHONVERSION/lib-dynload/:"${PYTHONPATH}"
export PYTHONHOME="${HERE}"/usr/
Expand Down

0 comments on commit 0d435aa

Please sign in to comment.