️ perf: improve with command

This commit is contained in:
eshanized
2025-01-11 18:36:40 +05:30
parent 3dc7463b1d
commit 28628fbb93

View File

@@ -1,6 +1,10 @@
#!/bin/bash #!/bin/bash
if [ $(which pkexec) ]; then
pkexec --disable-internal-agent "/usr/bin/calamares" "$@" # Check if pkexec exists and is executable
if command -v pkexec &>/dev/null; then
# Use pkexec to run calamares with administrative privileges
pkexec --disable-internal-agent /usr/bin/calamares "$@"
else else
/usr/bin/calamares "$@" # Fallback to running calamares without administrative privileges
/usr/bin/calamares "$@"
fi fi