1 parent c34f93a commit f540beeCopy full SHA for f540bee
1 file changed
nix/package/default.nix
@@ -26,6 +26,19 @@ writeShellScriptBin "glim" ''
26
exit 1
27
fi
28
29
+ # Use alternative if sudo is not found
30
+ if [[ ! `which sudo &>/dev/null` ]]; then
31
+ if which doas &>/dev/null; then
32
+ sudo () {
33
+ doas "''$*"
34
+ }
35
+ else
36
37
+ su -c "''$*"
38
39
+ fi
40
41
+
42
# Find GLIM device (use the first if multiple found, you've asked for trouble!)
43
USBDEV1=`blkid -L GLIM | head -n 1`
44
0 commit comments