So I tinker. A lot. And that means that I tend to have to reinstall my OS, because I do something crazy and break it. I don't mind that, tinkering is fun. But to make my life easier, I'm working on a bash script to auto-restore everything with a single command.
Last night I used it for the first time (Four days of crazy stuff, and boom! Broke everything), and it was a lifesaver. But there are a few areas that it could use improvement.
The main one I'm looking for help with right now is getting apps that aren't in the apt-get tool. I'm going to use Plex Media Server as an example. I need to download that directly from the website.
I'm not home right now, so I don't have my script in front of me, but I'm currently doing it this way (mock URLs in my code sample).
wget http://plex-website/downloads-page/plex-install-file-name-and-version.deb
dpkg plex-install-file-name-and-version.deb
Using wget to download the file, and dpkg to install it. Works like a charm.
This is a fragile approach, though, because it depends on the specific version number of the file I'm downloading. Over time, that specific version number will change, so this script will become out of date.
I'm looking for a dynamic way to write this so that I can download the file from the website without needing to hardcode the version number ahead of time. Ideally, something that I can use at multiple sites, because Plex is not the only one that I'll face this issue with.
Thanks in advance.