-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moduliarize (use includes) script #17
Comments
I can help with this or at least clean up the script. I will submit a PR in the next few days. |
Hi, can you work from the experimental branch for this? |
Sure, can do. Can I maybe use getopts so we can do run the script like |
Another option could be to have an "answers.txt" file that gets pulled in: Not sure how this plays with Docker. |
So, if
that would work fine with or without Docker. I can just source |
I might actually allow the user to specify the path to |
Should this work for 14.04 or 16.04? |
I didn't have a whole bunch of time the other day but I started on it today and got this done so far. Our config file would look like that. It would be used like: That's pretty much how NPM and a few other tools are installed. If you have any suggestions, let me know. PS: It's not properly tested so I'm sure it's quite buggy. |
I also added Docker so that it can be tested in an isolated environment. |
The script is becoming large.
For better maintainability try to use modules and include them. This also opens up the option to create upgrade versions of the scripts, i.e you can use the script to upgrade LibreOffice or Tomcat easily.
Possibly first create a downloader script alfinit.sh.
This will download alfinstall.sh and all includes.
Possible locations
/opt/alfresco/scripts/alfinstall.sh
/opt/alfresco/scripts/include/downloadurl.sh
/opt/alfresco/scripts/include/tomcat.sh
/opt/alfresco/scripts/include/alfresco.sh
/opt/alfresco/scripts/include/(module).sh
The alfinit.sh script itself can then be invoked again to update the basic alfinstall.sh script and the modules. The alfinstall.sh script can then be invoked with "upgrade" as parameter.
Here is a possible modularization pattern
http://stackoverflow.com/questions/78497/design-patterns-or-best-practices-for-shell-scripts
The text was updated successfully, but these errors were encountered: