Read configuration values from /etc/snap-pac

Test whether `/etc/snap-pac` is a readable file and then source it.
Set `DESC_LIMIT` only to the default value of `48` if it was not specified in the sourced file.
This commit is contained in:
jonasc 2018-01-05 15:22:44 +01:00 committed by GitHub
parent a6e0cd3287
commit c0f92f1cfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,8 +20,10 @@
set -o errtrace
[[ -f /etc/snap-pac ]] && [[ -r /etc/snap-pac ]] && source /etc/snap-pac
declare -r SNAPPER_CONFIG_FILE=/etc/conf.d/snapper
declare -r DESC_LIMIT=48
declare -r DESC_LIMIT=${DESC_LIMIT:-48}
declare -r name="snap-pac"
declare PACMAN_ABORT_ON_FAIL="no"
declare -r pacman_cmd="$(ps -q $(ps -p "$$" -o ppid=) -o args=)"