compholio / jabbrv

Automatic Journal Title Abbreviation Package for LaTeX
71 stars 45 forks source link

Check appropriate permissions without `sudo` #23

Closed KiruyaMomochi closed 4 years ago

KiruyaMomochi commented 4 years ago

It's possible that some operating system doesn't have sudo installed. Then even the user is root, he may still get an error from the script:

ERROR: Super user permissions are required to continue, instead run:
sudo ./install.sh

Hence, we should check if user have appropriate permissions by other methods. For example, the -w operator of test command.

compholio commented 4 years ago

Conceivably you could replace "sudo" with $SUDO and set the value only if the test command fails. Would you like to test and put together a patch for this?

KiruyaMomochi commented 4 years ago

24.

compholio commented 4 years ago

Thanks for the fix, hopefully you're enjoying the package!