Replies: 1 comment 1 reply
|
Ok, I think an existence check for My script at #!/bin/sh
if [ -x "/usr/bin/code" ]; then
/usr/bin/code "$@"
elif [ -x "/usr/bin/flatpak" ] ; then
/usr/bin/flatpak run com.visualstudio.code "$@"
elif [ -x "/usr/bin/distrobox-host-exec" ] ; then
/usr/bin/distrobox-host-exec flatpak run com.visualstudio.code "$@"
else
echo "Cannot run code"
exit 255
fi |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I like to have an alias declaration that works differently depending on my environment:
Is there a stable environment variable you can suggest to distinguish whether I am in a distrobox?
Normally I am looking for something like
DBX_VERSIONor equivalent. But open to other suggestions.All reactions