AppImage shouldn't ask for sudo every time

This commit is contained in:
Chris Esposito 2019-06-23 13:52:10 +10:00
parent 40bed49c25
commit 54aabcd17b
1 changed files with 14 additions and 12 deletions

View File

@ -41,6 +41,7 @@ if [ -n "$cxxpath" ] || [ -n "$gccpath" ]; then
export LD_LIBRARY_PATH="${cxxpath}${gccpath}${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="${cxxpath}${gccpath}${LD_LIBRARY_PATH}"
fi fi
if [ ! -f /etc/udev/rules.d/69-labrador.rules ]; then
cat > /tmp/roothelper <<\EOoF cat > /tmp/roothelper <<\EOoF
#!/bin/bash #!/bin/bash
cat > /etc/udev/rules.d/69-labrador.rules <<\EOF cat > /etc/udev/rules.d/69-labrador.rules <<\EOF
@ -55,5 +56,6 @@ sudo true && sudo /tmp/roothelper
sudo true || pkexec --disable-internal-agent /tmp/roothelper || true sudo true || pkexec --disable-internal-agent /tmp/roothelper || true
rm /tmp/roothelper rm /tmp/roothelper
fi
exec "$HERE/usr/bin/Labrador" "$@" exec "$HERE/usr/bin/Labrador" "$@"