diff --git a/contrib/snap/fix-bash-completion/Makefile b/contrib/snap/fix-bash-completion/Makefile new file mode 100644 index 000000000..ebaeca324 --- /dev/null +++ b/contrib/snap/fix-bash-completion/Makefile @@ -0,0 +1,7 @@ +build: + true +install: + #fixes up fwupdtool -> fwupd.fwupdtool + sed -i "s,\(complete -F _fwupd[a-z]*\) \(fwupd.*\),\1 fwupd.\2,; \ + s,\(command.*\)\(fwupdtool\),\1fwupd.\2," \ + ${SNAPCRAFT_STAGE}/usr/share/bash-completion/completions/* diff --git a/contrib/snap/snapcraft-stable.yaml b/contrib/snap/snapcraft-stable.yaml index d4e092697..56225ef57 100644 --- a/contrib/snap/snapcraft-stable.yaml +++ b/contrib/snap/snapcraft-stable.yaml @@ -20,7 +20,6 @@ apps: plugs: fwupdtool: - interface: fwupd interface: home parts: @@ -261,6 +260,10 @@ parts: - -usr/lib/*/glib-2.0 - -usr/lib/*/pkgconfig after: [appstream-glib-dev, libfwup-dev, gudev, gusb] + fix-bash-completion: + plugin: make + source: contrib/snap/fix-bash-completion + after: [fwupd] update-mime: plugin: make source: contrib/snap/update-mime