diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-10-31 22:16:33 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-10-31 22:16:33 +0000 |
commit | 2e06caa8f5f035c338ccf784c1b49238a47085f4 (patch) | |
tree | e990ccc09a7c80b28a5c9c3f4d6617ab2573edf9 /files/add-draklive-install-shortcut | |
parent | ade6ca04b8d44a8f3c3257f81ed4a35b51a832fe (diff) | |
download | draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.gz draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.bz2 draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.tar.xz draklive-config-2e06caa8f5f035c338ccf784c1b49238a47085f4.zip |
Add Xfce desktop shortcut to draklive-install at run time, not build time.
Xfce has added an extra restriction on executable desktop files in the
Desktop directory. They now need to have a xfce-exe-checksum extended
file attribute as well as having execute permissions. We can't add
this at build time because squashfs does not support system extended
attributes.
Diffstat (limited to 'files/add-draklive-install-shortcut')
-rw-r--r-- | files/add-draklive-install-shortcut | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/files/add-draklive-install-shortcut b/files/add-draklive-install-shortcut new file mode 100644 index 0000000..8c81d8b --- /dev/null +++ b/files/add-draklive-install-shortcut @@ -0,0 +1,17 @@ +#!/usr/bin/sh + +dst_dir=$HOME/Desktop + +src_file=/usr/share/applications/mageia-draklive-install.desktop +dst_file=$dst_dir/draklive-install.desktop + +[ -x /usr/bin/gio ] || exit +[ -x /usr/bin/sha256sum ] || exit +[ -r $src_file ] || exit +[ -e $dst_file ] && exit + +mkdir -p $dst_dir +cp $src_file $dst_file +checksum=$(sha256sum $dst_file) +gio set $dst_file metadata::xfce-exe-checksum ${checksum:0:64} +chmod 750 $dst_file |