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 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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_VERSION
or equivalent. But open to other suggestions.Beta Was this translation helpful? Give feedback.
All reactions