cryinkfly / Autodesk-Fusion-360-for-Linux

This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/wiki
MIT License
1.81k stars 116 forks source link

Optimisation: Automate checking for multilib on arch *solved* #98

Closed TN-1 closed 2 years ago

TN-1 commented 2 years ago
case $CHOICE in
        1)
            archlinux-2 &&
            select-your-path
            ;;
        2)
            sudo echo "[multilib]" >> /etc/pacman.conf &&
            sudo echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf &&
            archlinux-2 &&
            select-your-path
            ;;
esac

The above step could be replaced by a well crafted if and grep statement, checking if the multilib line exists and is uncommented. If so, archlinux-2. If not, then prompt the user to confirm the change then archlinux-2.

In pseudocode:

IF(grep[/etc/pacman.conf] for "multilib"[without #])
archlinux-2
else
dialog asking user to yes/no multilib

Happy to take care of this if nobody else (who actually use arch) wants to and if @cryinkfly approves the change.

blazej222 commented 2 years ago

I actually had this issue on my PC

fusion360-install.sh: line 488: /etc/pacman.conf: Permission denied

Didn't open github issue on it because I thought it was related to some of changes I had previously made to sudo on my system, but apparently same thing happened on fresh arch install in VM. I was going to further investigate the problem tomorrow and fix it, but keep that issue in mind when testing your upcoming changes :)

TN-1 commented 2 years ago

@blazej222 PR #101 implements a fix for that issue. See the link below for further info on the bug.
https://stackoverflow.com/questions/10134901/why-sudo-cat-gives-a-permission-denied-but-sudo-vim-works-fine
Cheers.