Skip to content
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

Should the same variables be in multiple .conf files? #192

Open
fseatonuc opened this issue Feb 24, 2022 · 1 comment
Open

Should the same variables be in multiple .conf files? #192

fseatonuc opened this issue Feb 24, 2022 · 1 comment
Labels

Comments

@fseatonuc
Copy link

I noticed that some variables appear in more that one .conf file. I thought the alis-commons.conf would be the location to place variables common to more than one of the .sh scripts.

I noticed this when setting USER_NAME and then found it in two .conf files, so I searched all of the .conf files for the same variable settings and found this:

% grep -f <(grep -h '^[A-Z]' {alis,alis-commons,alis-packages}.conf | sort | cut -f 1 -d= | uniq -c | grep -v ' 1 ' | awk '{print "^"$NF"="}') {alis,alis-commons,alis-packages}.conf
alis.conf:LOG="false"
alis.conf:AUR_PACKAGE="paru-bin !yay-bin !paru !yay !aurman" # (single)
alis.conf:USER_NAME="picodotdev"
alis.conf:USER_PASSWORD="ask"
alis.conf:PACKAGES_PIPEWIRE="false"
alis.conf:SYSTEMD_UNITS=""
alis-commons.conf:AUR_PACKAGE="paru-bin"
alis-commons.conf:LOG="false"
alis-commons.conf:USER_NAME="picodotdev"
alis-commons.conf:USER_PASSWORD="ask"
alis-commons.conf:PACKAGES_PIPEWIRE="false"
alis-packages.conf:LOG="false"
alis-packages.conf:SYSTEMD_UNITS="!ufw.service !bluetooth.service !docker.service"

If I include alis-recovery.conf in both greps above (or change the file list to *.conf), the list is even longer.

@picodotdev
Copy link
Owner

The variables in files alis.conf and alis-packages.conf are the files the user should edit and know. alis-commons.conf is a internal script file the user should not be awared of.

I would need to review if some of those alis-commons.conf could be deduped but is not an important thing for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants