Skip to content

Commit 1505b07

Browse files
authored
test in prod
1 parent d2f8aec commit 1505b07

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

make-appimage.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,19 @@ rm -f \
2727
./AppDir/bin/opencode-cli \
2828
./AppDir/shared/bin/opencode \
2929
./AppDir/shared/bin/opencode-cli
30-
cp -v /usr/bin/opencode ./AppDir/bin/opencode
31-
ln -s opencode ./AppDir/bin/opencode-cli
32-
patchelf --set-interpreter /tmp/"$kek" ./AppDir/bin/opencode
33-
patchelf --set-rpath '$ORIGIN/../lib' ./AppDir/bin/opencode
3430

35-
cat <<EOF > ./AppDir/bin/random-linker.src.hook
31+
cat <<EOF > ./AppDir/bin/opencode-cli
3632
#!/bin/sh
3733
cp -f "\$APPDIR"/shared/lib/ld-linux*.so* /tmp/"$kek"
34+
export LD_LIBRARY_PATH="\$APPDIR"/shared/lib
35+
exec "\$APPDIR"/bin/opencode.wrapped
3836
EOF
3937
chmod +x ./AppDir/bin/*.hook
4038

39+
cp -v /usr/bin/opencode ./AppDir/bin/opencode.wrapped
40+
ln -s opencode-cli ./AppDir/bin/opencode
41+
patchelf --set-interpreter /tmp/"$kek" ./AppDir/bin/opencode.wrapped
42+
4143
# for weird reasons opencode now attempts to execute $(basename $APPIMAGE)/opencode-cli
4244
# this makes absolutely no sense wtf, so we have to set the APPIMAGE var to the
4345
# opencode binary inside the AppDir so that it resolves correctly

0 commit comments

Comments
 (0)