forked from ungleich-public/cdist
also check if sources file is not empty
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
f46b2a9a5a
commit
0356d2eeff
1 changed files with 3 additions and 1 deletions
|
@ -28,5 +28,7 @@ name="$__object_id"
|
||||||
repo_name="${name#ppa:}"
|
repo_name="${name#ppa:}"
|
||||||
repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list"
|
repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list"
|
||||||
|
|
||||||
[ -f "/etc/apt/sources.list.d/${repo_file_name}" ] && echo enabled || echo disabled
|
[ -f "/etc/apt/sources.list.d/${repo_file_name}" -a \
|
||||||
|
-s "/etc/apt/sources.list.d/${repo_file_name}" ] \
|
||||||
|
&& echo enabled || echo disabled
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue