mirror of https://github.com/EspoTek/Labrador.git
AppImage shouldn't ask for sudo every time
This commit is contained in:
parent
40bed49c25
commit
54aabcd17b
|
@ -41,19 +41,21 @@ 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
|
||||||
|
|
||||||
cat > /tmp/roothelper <<\EOoF
|
if [ ! -f /etc/udev/rules.d/69-labrador.rules ]; then
|
||||||
#!/bin/bash
|
cat > /tmp/roothelper <<\EOoF
|
||||||
cat > /etc/udev/rules.d/69-labrador.rules <<\EOF
|
#!/bin/bash
|
||||||
ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="ba94", SYMLINK="EspoTek_Labrador", MODE="0666"
|
cat > /etc/udev/rules.d/69-labrador.rules <<\EOF
|
||||||
ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="2fe4", SYMLINK="ATXMEGA32A4U DFU Bootloader", MODE="0666"
|
ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="ba94", SYMLINK="EspoTek_Labrador", MODE="0666"
|
||||||
EOF
|
ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="2fe4", SYMLINK="ATXMEGA32A4U DFU Bootloader", MODE="0666"
|
||||||
udevadm trigger
|
EOF
|
||||||
EOoF
|
udevadm trigger
|
||||||
chmod a+x /tmp/roothelper
|
EOoF
|
||||||
|
chmod a+x /tmp/roothelper
|
||||||
|
|
||||||
sudo true && sudo /tmp/roothelper
|
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" "$@"
|
||||||
|
|
Loading…
Reference in New Issue