Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux Mint: apt-get Legacy Utility Command
@bryceml can you please check that my syntax is correct? from lines - 28 to 49 - 81 to 116 **Reasons for these changes** 1. Linux Mint still uses apt-get out-of-the-box instead of Apt. issue: https://github.com/cromat/ePSXe64Ubuntu/commit/9deb4bc17ea5e53d30c6023faca060ac612be6e4. 2. Realised through this link (https://forums.linuxmint.com/viewtopic.php?t=274477) that same may happen to Linux Mint 19 installs with regards to the libcurl3 to 4 issue (#5). **reference** - https://ryanstutorials.net/bash-scripting-tutorial/bash-if-statements.php to make sure *elif* statement is used correctly - https://forums.linuxmint.com/viewtopic.php?t=263277 checked where packages are downloaded from - resulted to be from ubuntu - https://www.rootusers.com/check-which-linux-mint-version/ checked whether Linux Mint releases have two decimal places like ubuntu 18.*04* - resulted negative thus, had to change *cut -c -2* to *cut -c -1* in line 38. - https://www.tldp.org/LDP/abs/html/comparison-ops.html - https://stackoverflow.com/a/4277753 - https://stackoverflow.com/questions/2237080/how-to-compare-strings-in-bash
- Loading branch information
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than duplicating the entire code blocks, you could extend the if statement
if the blocks of code inside the if statement is the same.
I haven't looked at if the cut works correctly, if you want to post a copy of /etc/os-release from linux mint somewhere so I don't have to make a box for it, I could check it pretty easily.
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, you should be able to change apt to apt-get anywhere.
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cut grabs that many off of the first of the line
from the cut man page
I tested it with the example they had at that link and it requires cut -c -2
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for chiming in, Bryce.
Typical etc/release output for Linux Mint would be:
About apt and apt-get, I was keeping it because of older distros not having apt (pre-16.04).
In hindsight, I doubt older computers of versions earlier than 16.04 have the ability to run ePSXe smoothly...
So, maybe I ought to revert back to apt.
> I tested it with the example they had at that link and it requires cut -c -2So for Mint which versions are numbered without the 0 (like in Ubuntu (16.04, 18.04), I still needcut -c -2
?Thank you once again, mate.
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I realise....
So the following should work...
Foolproofing the code
Say that problem ( #5 ) persists for Ubuntu version 19.04 and 19.10 and 20.xx (and Linux Mint 20.x) etc, how would we go about this?
Cheers, @bryceml
68a031d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should continue to work, the only worry is in 4-5 years when the package version of libcurl will move from archive.ubuntu.com to old-releases.ubuntu.com. The check "-ge" makes sure the version number is greater than, or equal.