Skip to content

Commit

Permalink
Add fusermount scripts from com.borgbase.Vorta
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdragon-001 committed Sep 9, 2023
1 parent 2afe576 commit 59e2e1a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fusermount-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

if [ -z "$_FUSE_COMMFD" ]; then
FD_ARGS=
else
FD_ARGS="--env=_FUSE_COMMFD=${_FUSE_COMMFD} --forward-fd=${_FUSE_COMMFD}"
fi

if [ -e /proc/self/fd/3 ] && [ 3 != "$_FUSE_COMMFD" ]; then
FD_ARGS="$FD_ARGS --forward-fd=3"
fi

exec flatpak-spawn --host --forward-fd=1 --forward-fd=2 $FD_ARGS fusermount "$@"
19 changes: 19 additions & 0 deletions host-command-wrapper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "host-command-wrapper",
"buildsystem": "simple",
"build-commands": [
"install fusermount-wrapper.sh /app/bin/fusermount",
"install fusermount-wrapper.sh /app/bin/fusermount3",
"install umount-wrapper.sh /app/bin/umount"
],
"sources": [
{
"type": "file",
"path": "fusermount-wrapper.sh"
},
{
"type": "file",
"path": "umount-wrapper.sh"
}
]
}
1 change: 1 addition & 0 deletions io.kopia.KopiaUI.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"--own-name=org.kde.*"
],
"modules": [
"host-command-wrapper.json",
{
"name": "kopia-ui",
"buildsystem": "simple",
Expand Down
3 changes: 3 additions & 0 deletions umount-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

exec flatpak-spawn --host --forward-fd=1 --forward-fd=2 umount "$@"

0 comments on commit 59e2e1a

Please sign in to comment.