Add to support comments start with '#' or ';'

This patch allows to describe the package list with comments in
the file 'packages'.

	; Fundamental package list to build LAMP server

	# Install MySQL
	mysql-client		# Client
	mysql-server		# Server

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I32ffc3e845b3ff7b05b81a26d99e83ed55488f97
This commit is contained in:
Dongjin Kim
2021-04-09 02:38:04 +09:00
parent d4c7b57684
commit 87f3cbffbf
2 changed files with 16 additions and 4 deletions

View File

@@ -1,8 +1,21 @@
;
; Fundamental package list to build LAMP server
;
; References:
; [1] https://phoenixnap.com/kb/how-to-install-lamp-stack-on-ubuntu
; [2] https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04
# Install Apache installation
apache2
curl
libapache2-mod-php
mysql-client
mysql-server
ufw
# Install MySQL
mysql-client # Client
mysql-server # Server
# Insall PHP
php
php-cli
php-curl
@@ -13,4 +26,3 @@ php-mysql
php-mysql
php-xml
php-zip
ufw

View File

@@ -99,7 +99,7 @@ get_kernel_cmdline_defaults() {
}
get_packages() {
[ -f ${1} ] && cat ${1}
[ -f ${1} ] && cat ${1} | awk -F '#|;' '{print $1}'
}
get_flavour_packages() {