onedrive-d-old
onedrive-d-old copied to clipboard
setup.sh uses sudo even on systems with no sudo command
I'm on debian sid, and my system has no sudo
command, instead I use su
or su -c 'command'
to run commands as root. This is not supported by the installer.
To make sure I change code correctly, changing from
PACKAGE_INST='sudo apt-get install'
to
PACKAGE_INST='su -c apt-get install'
will work for Debian?
No, the argument to -c must be a single argument, and the arguments are put through globbing and so on like on a normal shell to divide the arguments. Note that this is not a bug on all systems since many debian systems do in fact have sudo.
I saw commit https://github.com/xybu/onedrive-d/commit/779355291ea72d44a72049da32571d70629839af has been applied since this bug was raised. I'm proposing to take the following actions before closing this issue:
Update the error message in install.sh. Add the text: Install sudo using your distributions package manager, or normal install method
Update README.md. Change line from: Steps 1, 2, and 5 need to be done manually. For steps 3 and 4, the script file install.sh will handle the work automatically. To: Steps 1, 2, and 5 need to be done manually. For steps 3 and 4, the script file install.sh will handle the work automatically. If your distribution is not supported by the install script, perform the steps manually as described below.
@Darksonn if you think additional functionality is justified, could you please raise it as a new issue and tag it as a enhancement.