Hello. I search some help with some autonation scripts for my project. Unfortunatellt, some problems with them are too difficult for me to solve them alone. Bellow I list some of them (some points are listed as pseudo-code for easier presentation):
- make a function with:
Part 1a:
-
has variables (can be as array) with a user given url addressess (for example: gnu_url=“https://ftp.gnu.org/gnu/”, etc.)
-
has variable array of program names and assigned url variable (for example:
gnu -> [ app1, app2, etc.] -
example: [autoconf, automake] -> gnu_url
In result should be that when the script reads the app name then it will “know” that this app is under given address and save this location (with app name) into a temporary variable
-
example: autoconf => $gnu_url/autoconf *(in result: autoconf => ftp.gnu.org/gnu/autoconf/)
-
unset not needed anymore variables to free memory
Part 1b:
when the script “know” where search this app, it should read this address and then:
- read the folder’s content and save it into a variable
- extract the app version and compare with one has the highest value and list the archive files (zip, tar.gz, tgz, bz2, 7z, tar.xz, etc.), allowing user to selct one
- download the selected file