* rework DOWNLOAD_METHOD, download_file, open_file
* remove legacy command leftover line
* return empty string if download fails and return/exit if this happens and show error message
* fix IFS var typo
* bump version
* add quotes
Co-authored-by: TotallyLeGIT <bbkqx24kxlgvgbss@mailban.de>
when argument `-l` is used, parse profiles.ini instead of just listing folders in the default profiles dir.
This allows to select profiles located outside of the default profiles directory and makes selection easier because it also shows the profile name (and selection is by number instead of having to copy-paste a path)
* Uses `perl` as a last resort if `curl` and `wget` are not available (fixes#537)
* Aborts and notifies user if none of the above are installed
* Better use of functions
* When version numbers are checked, the contents are immediately saved to a temp dir. This allows us to skip using wget/curl/perl a second time
* Improved messages for users
* Added various font colors for ease of use and aesthetics
* updated shebang
* The script now compares its version number to the one online. If there is a newer version of `updater.sh` online it ask the user if he wants to download and run it.
* 2 parameters are supported: `-donotupdate` to disable the update-check and `-update` to auto-download and run the new version without asking
* Backup files are now saved to the directory `userjs_backups` instead of causing more bloat in the profile directory.
this should now work no matter how the script is called (including symlinks) on both Mac and Linux.
+ Storing and restoring the original working directory to prevent problems in certain circumstances.