Skip to content

Commit 191cee1

Browse files
authored
add option to set dedicated env variables
1 parent 923f659 commit 191cee1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

useful-tools/bin/AppRun-generic

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ _get_main_bin_name() {
4040

4141
_get_main_bin_name
4242

43+
# Allow users to set env variables for specific AppImage
44+
# This feature only works with the uruntime
45+
if [ "$1" = '--appimage-add-env' ]; then
46+
shift
47+
for v do
48+
echo "$v" >> "$APPIMAGE".env
49+
>&2 echo "Added '$v' to $APPIMAGE.env"
50+
done
51+
exit 0
52+
fi
53+
4354
# additional scripts can be placed in the top level bin dir
4455
# those with a name that ends up .hook will be executed in the current shell
4556
# those that end with .bg.hook will be executed in the background

0 commit comments

Comments
 (0)